I have to have below columns in my output in addition to the ones that I have specified in the query
count of (nativeprodID) for each userID in last 7 days
count of (nativeProdID) for each userID in last 15 days
count of (nativeprodID) for each userID in last 30 days
SELECT userid, nativeprodID, nativeVersion, nativeVersionName,
MAX(StartTime) AS Last_Used_TimeStamp,
FROM
[ProdTable]
WHERE NativeProd ='AAA'
AND GlobalPod='AAA'
GROUP BY 1,2,3,4
LIMIT 10
I was thinking of using cross join but is there any other easier technique?