Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A ride hailing company has their DB structured in 3 major tables as described in SCHEMA below. Write a query to fetch the city names

  • A ride hailing company has their DB structured in 3 major tables as described in SCHEMA below. Write a query to fetch the city names along with earnings from each city. Earnings are calculated as the sum of fares of all the rides taken in that city. The output should be structured as: cities.name earnings The output is sorted ascending by earnings, then ascending by the city name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Accounting

Authors: Elizabeth A. Gordon, Jana S. Raedy, Alexander J. Sannella

1st edition

978-0133251579, 133251578, 013216230X, 978-0134102313, 134102312, 978-0132162302

More Books

Students also viewed these Programming questions