Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help with my query they want only cities with 5 star but they want a specific amount per city if you can look

Can someone help with my query they want only cities with 5 star but they want a specific amount per city if you can look at question 3 please and give me feedback.

image text in transcribed
image text in transcribed
3. Adjust your previous query to include the city for each group to ensure you are selecting five groups: three from New York, one from Chicago, and one from San Francisco. You'll need to JOIN the city table to access the city names. \( \begin{array}{ll}48 & \text { SELECT } \\ 49 & \text { grp.city_id, } \\ 50 & \text { group_name } \\ 51 & \text { rating, } \\ 52 & \text { members } \\ 53 & \text { FROM grp } \\ 54 & \text { JOIN city on grp.city_id = city.city_id } \\ 55 & \text { WHERE city = "New York" AND rating = } 5 \\ 56 \text { 63 } & \text { WHERE city = "Chicago" AND rating = } 5 \\ 57 & \text { WHERE city = "San Fransico" AND rating = } 5 \\ 58 & \text { ORDER BY members desc; } \\ 59 & \\ 60 & \\ 61 & \end{array} \)

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_2

Step: 3

blur-text-image_3

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

Modern Datalog Engines In Databases

Authors: Bas Ketsman ,Paraschos Koutris

1st Edition

1638280428, 978-1638280422

More Books

Students also viewed these Databases questions