question

mondy99 avatar image
mondy99 asked

Join query to calculate Minimum datediff

I have 2 SQL tables, one for subscribers (ID, Name), second for subscribers_Upgrades [Subscriber_ID (FK), Upgrade_Level, Upgrade_Date) (There are 7 upgrade levels) I need a query to get the top 10 subscribers who upgraded in the shortest period and Upgrade_Level, and Upgrade Date for specific Upgrade_Level (any one of the available 7 Upgrade level), and within specific period of time we can for example supply the 2 conditions like Where Upgrade_Level = 3 and Upgrade_Date between '01-April-2014' and '20-May-2016'
datediff
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.