79173226

Date: 2024-11-09 16:42:55
Score: 1
Natty:
Report link

if using Snowflake SQL (unsure if this works on others), you can embed an "iff" condition in the window function to do something like this:

select Person, rank() over (partition by Restaurant order (iff(Person is null, 0, arrival_time) by arrival_time asc) as arrival_rank from dinner_show_up;

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: dough go