Fake Apps Sentence #2


#1

Can anyone help me to do this sentence, i have a lot off problems please.

Return the name, category, and price of the app that has been downloaded the least amount of times.


#2

SELECT ... (which columns?)
FROM ... (which table?)

Did you get a result for that much? Are you stuck on getting the app with the least downloads?


#3

SELECT name, category, price, MIN(downloads) FROM fake_apps
GROUP BY category;

This should give you the solution. But what exactly is it that you don't understand?


#4

What does GROUP BY name do for us here?


#5

My mistake. Should be GROUP BY category. It's fixed now.


#6

That makes more sense now ... I was wondering what I was missing. :smile:


#8

SELECT name, category, price FROM fake_apps where downloads = (select MIN(downloads) from fake_apps);


#9

I guess you don't need a GROUP BY as the question only asks for the app with the least downloads. Please can someone clarify this?


#10

My result is the app called Zimlane.


#11

SELECT name, category, price, MIN(downloads) FROM fake_apps;
You don't need GROUP BY clause for this. Otherwise it would be wrong. It will return multiple results instead one.


#12

SELECT NAME, CATEGORY, MIN(DOWNLOADS) FROM FAKE_APPS;

this is the correct response.


#13

I think "SELECT NAME, CATEGORY, MIN(DOWNLOADS) FROM FAKE_APPS;” is wrong.
we dont need to min(downloads).
But why the command below does
t work .

SELECT NAME, CATEGORY FROM FAKE_APPS
WHERE DOWNLOADS = MIN(DOWNLOADS);


#14

What about

SELECT name, category, price FROM (SELECT *, MIN(downloads) from fake_apps);

?


#15

For clarity this is the correct code. 'app' is singular....

--select name, category, price, min(downloads) from fake_apps;