Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

AVG a range of dates while grouping them by supplier

$
0
0
I have multiple suppliers with a purchase order date. I'm trying to calculate the average time between purchase orders but keep it grouped by supplier. I thought I could assign a row_number and over order by, but that doesn't take into account any breaks

Viewing all articles
Browse latest Browse all 3145

Trending Articles