Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for SUM and COUNT with nobel table #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

quapka
Copy link

@quapka quapka commented Feb 12, 2017

There are more exercises for SUM, COUNT, etc. functions. This solution was missing so I wrote that.

@zenvercoder zenvercoder mentioned this pull request Feb 23, 2017
Copy link

@onatsahin onatsahin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should definitely be merged

Copy link

@pb1988ster pb1988ster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The qsn :"Show the year and subject where 3 prizes were given. Show only years 2000 onwards " is looking at unique combinations of yr and subject . So correct ans is select yr,subject from nobel
where yr >= 2000
group by yr,subject
having count(yr||subject)=3

@DameAnneSo
Copy link

Out of curiosity, regarding question 8, "For each subject show how many years have had prizes awarded.", how would you do it, if the question was instead "For each subject show how many years have had 0 prizes awarded." ?

Aewold added a commit to Aewold/sqlzoo-solutions that referenced this pull request Jul 28, 2020
Updated jisaw#10 to current parameters, and a working version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants