Timeline for SELECT highest quantity in related table, exclude if there is a tie
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 28, 2019 at 12:33 | comment | added | ypercubeᵀᴹ | I meant 1 level of CTEs or derived table, instead of 2 levels. | |
| Feb 28, 2019 at 12:24 | comment | added | Lennart - Slava Ukraini | I have 0 now, but I see your point ;-) I'm not entirely sure what the OP wants, so I more or less just copied the original query and adapted it. | |
| Feb 28, 2019 at 12:04 | comment | added | ypercubeᵀᴹ | With COUNT(*) OVER (PARTITION BY Receipt_number, Quanity) , you could have only 1 CTE. | |
| Feb 28, 2019 at 7:48 | history | answered | Lennart - Slava Ukraini | CC BY-SA 4.0 |