DATA ANALYSIS > QUESTIONS & ANSWERS > OR&IE 3120 Industrial Data and System Analysis - Cornell University. HW 05 Solutions (All)
OR&IE 3120 Industrial Data and System Analysis - Cornell University. HW 05 Solutions select STRFTIME('%Y-%m-%d %H:00:00', tpep_pickup_datetime) AS pickup_hour, COUNT(*) as num_trips from trips group... by 1 order by 1 #2 SELECT z1.zone As PUZone, z2.zone AS DOZone, COUNT(*) as num_trips FROM trips INNER JOIN zone as z1 ON trips.PULocationID = z1.LocationID INNER JOIN zone as z2 ON trips.DOLocationID = z2.LocationID GROUP BY 1,2 ORDER BY 3 DESC LIMIT 10 #3. (a) P(D<=5) is the number of records with D<=5 divided by the total number of records. We can get the number of records where D<=5 by running this query SELECT COUNT(*) FROM Demand WHERE D<=5 The result is 78. There are 246 records in Demand. So P(D<=5) = 78/246 = .317073171 (b) Q01 SELECT N, COUNT(*) As NumRecordsWithDLessThanOrEqualToN FROM Demand, WholeNumbers WHERE D <= N GROUP BY N ORDER BY N (c) Q02 SELECT * FROM Q01 WHERE NumRecordsWithDLessThanOrEqualToN >= 0.5*246 ORDER BY N (d) Q03 SELECT * FROM Q02 ORDER BY N LIMIT 1 (e) SELECT N, COUNT(*) As NumRecordsWithDLessThanOrEqualToN FROM Demand, WholeNumbers [Show More]
Last updated: 2 years ago
Preview 1 out of 3 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Apr 29, 2023
Number of pages
3
Written in
This document has been written for:
Uploaded
Apr 29, 2023
Downloads
0
Views
66
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·