u sql - Writing SQL to U-SQL Query -


can please guide me in writing below sql in u-sql language used in azure data lake

select tt.userid, count(tt.userid) (select userid,count(userid) cou   [dbo].[users]    createdtime> dateadd(wk,-1,getdate())     group userid,datepart(minute,createdtime)/5) tt group tt.userid 

i don't find datepart function in u-sql . azure data analytic job giving me error.

u-sql not provide t-sql intrinsic functions except few (like like). see https://msdn.microsoft.com/en-us/library/azure/mt621343.aspx list.

so how do datetime operations? use c# functions , methods!

so dateadd(wk, -1, getdate()) datetime.now.adddays(-7) , datepart(minute,createdtime)/5 (there ) in line) createdtime.minute/5 (maybe need cast double if want non-integer value).


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -