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,
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started