Skip to content

Solution for SUM and COUNT with nobel table#10

Open
quapka wants to merge 2 commits intojisaw:masterfrom
quapka:master
Open

Solution for SUM and COUNT with nobel table#10
quapka wants to merge 2 commits intojisaw:masterfrom
quapka:master

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

@pulkit-arch pulkit-arch 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