Question: My question here would be simple and has 2 parts, THE LANGUAGE BEING USED HERE IS R! For the easier one, my question asks of

My question here would be simple and has 2 parts, THE LANGUAGE BEING USED HERE IS R!

For the easier one, my question asks of me to calculate the total number of record in the specific query? How to calculcate that? Should I use nrows multiply by ncol to get the answer?

Second is more coding,

My question here would be simple and has 2 parts, THE LANGUAGE

The second part of this question says to calculcate the sum of all latitudes. Now, I have all latitude numbers, which are from around 32 different variables. How do I get the sum of them from the table I have created? My function to get the result was ==>

q2_sql = "SELECT city, state, zip_code FROM zip WHERE state == 'IL'" head(dbGetQuery(dbcon, q2_sql))

Thanks!

Note that I've made the query string more readable through the use of whitespace. Question 3a, (2 points): Build an SQL query that joins both the 'zip' and the tickets' tables on the 'zip_code' field, and restricts the results to tickets where the fine_level_1 amount is more than $100. What is the sum of the latitudes of all of the records in this query? Note that this sum should not include records for which the latitude is not recorded. (Exercise: why aren't some latitudes recorded after the join?) Note that I've made the query string more readable through the use of whitespace. Question 3a, (2 points): Build an SQL query that joins both the 'zip' and the tickets' tables on the 'zip_code' field, and restricts the results to tickets where the fine_level_1 amount is more than $100. What is the sum of the latitudes of all of the records in this query? Note that this sum should not include records for which the latitude is not recorded. (Exercise: why aren't some latitudes recorded after the join?)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!