Question: Please correct my SQL attached, I believe it's the WHERE function because it runs correctly without it but I am not sure how to get
Please correct my SQL attached, I believe it's the WHERE function because it runs correctly without it but I am not sure how to get the desired outcome of the top ranked"
Revise the query from the last problem: when there is a tie of quantityrank, assign
the same rank to each tied row, but ensure that the next rank in the sequence is not
skipped. Filter the results to only show the rows of the top two quantityrank.
Hint: consider using subquery.
ccustomerfirstname,
ccustomerlastname,
cpquantity,
DENSERANK OVER PARTITION BY ccustomerfirstname, ccustomerlastname
FROM
customer c
JOIN customerpurchases cp ON ccustomerid cpcustomerid;
WHERE quantityrank AND ;
ORDER BY
ccustomerlastname,
ccustomerfirstname,
quantityrank;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
