3 ms·
Why, in the second example with RANK(), does the values for 1/2 go from rank 12 to 15 and then 6, 7? Am I missing something obvious?
by eternalny1 7y ago
Why, in the second example with RANK(), does the values for 1/2 go from rank 12 to 15 and then 6, 7?
Am I missing something obvious?
- caf 7y agoIt's because the query has an ORDER BY clause that orders it all by sale_date, whereas the RANK() is calculated from subtotal order.