pitcher_panel.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. from model.DateUtils import DateUtils
  2. from model.DataBaseUtils import *
  3. from model.log import logger
  4. from model.CommonUtils import *
  5. du = DateUtils()
  6. ck = CkUtils()
  7. db = MysqlUtils()
  8. log = logger()
  9. def get_pitcher_panel_channel(pitcher,channel,start,end,page,page_size,order_by,order):
  10. sql=f"""select channel,stage,platform,book,
  11. formatDateTime(dt,'%Y-%m-%d') as date,
  12. cost,
  13. first_order_amount,
  14. toDecimal32(if(cost=0,0,first_order_amount/cost),4) first_roi,
  15. first_order_user,first_order_count,
  16. toDecimal32(if(first_order_user=0,0,cost/first_order_user),2) first_per_cost,
  17. view_count,click_count,follow_user,
  18. toDecimal32(if(click_count=0,0,follow_user/click_count),4) follow_rate,
  19. toDecimal32(if(follow_user=0,0,cost/follow_user),2) follow_per_cost,
  20. total_cost,
  21. toDecimal32(if(total_cost=0,0,total_amount/total_cost),2) back_rate
  22. from dw_daily_channel where dt>='{start}' and dt<='{end}' """
  23. if pitcher!='all':
  24. sql += f" and pitcher='{pitcher}' "
  25. if channel!='':
  26. sql += f" and channel='{channel}' "
  27. sql += f" order by {order_by} {order} limit {page},{page_size} "
  28. print(sql)
  29. data=ck.execute(sql)
  30. key=['channel','stage','platform','book','date','cost','first_order_amount','first_roi','first_order_user',
  31. 'first_order_count','first_per_cost','view_count','click_count','follow_user','follow_rate','follow_per_cost',
  32. 'total_cost','back_rate']
  33. return get_dict_list(key, data)
  34. def get_pitcher_panel_daily(pitcher, start, end, page, page_size, order_by, order):
  35. sql=f"""
  36. select formatDateTime(dt,'%Y-%m-%d') date ,pitcher,
  37. toDecimal32(sum(cost),2) cost,
  38. toDecimal32(sum(first_order_amount),2) first_order_amount,
  39. toDecimal32(if(cost=0,0,first_order_amount/cost),4) first_roi ,
  40. toDecimal32(sum(order_amount),2) order_amount,
  41. toDecimal32(if(cost=0,0,sum(reg_order_amount)/cost),4) today_roi,
  42. toDecimal32(sum(total_cost),2) total_cost,
  43. toDecimal32(sum(total_amount),2) total_amount,
  44. toDecimal32(total_amount-total_cost,2) total_profit,
  45. toDecimal32(if(total_cost=0,0,total_amount/total_cost),4) total_roi
  46. from dw_daily_channel where dt>='{start}' and dt<='{end}' """
  47. if pitcher != 'all':
  48. sql += f" and pitcher='{pitcher}' "
  49. sql += f" group by date,pitcher order by {order_by} {order} limit {page},{page_size} "
  50. print(sql)
  51. data = ck.execute(sql)
  52. key=['date','pitcher','cost','first_order_amount','first_roi','order_amount','today_roi','total_cost','total_amount','total_profit','total_roi']
  53. return get_dict_list(key,data)
  54. def get_pitcher_panel_overview(pitcher):
  55. sql=f"""select pitcher,
  56. toDecimal32(cost,2) cost,
  57. toDecimal32(amount,2) amount,
  58. toDecimal32(roi,4) roi,
  59. channel_count,on_channel_count,
  60. off_channel_count,
  61. toDecimal32(this_month_cost,2) this_month_cost,
  62. toDecimal32(this_month_amount,2) this_month_amount,
  63. toDecimal32(this_month_roi,4) this_month_roi,
  64. toDecimal32(last_month_cost,2) last_month_cost,
  65. toDecimal32(last_month_amount,2) last_month_amount,
  66. toDecimal32(last_month_roi,4) last_month_roi,
  67. toDecimal32(last_month_far_amount,2) last_month_far_amount,
  68. follow_user
  69. from dm_pitcher_daily_page_total where dt='{du.get_n_days(-1)}'"""
  70. if pitcher != 'all':
  71. sql += f" and pitcher='{pitcher}' "
  72. print(sql)
  73. data=ck.execute(sql)
  74. print(data)
  75. key=['pitcher','cost','amount','roi','channel_count','on_channel_count','off_channel_count','this_month_cost','this_month_amount','this_month_roi',
  76. 'last_month_cost','last_month_amount','last_month_roi','last_month_far_amount','follow_user']
  77. return get_dict_list(key,data)
  78. def get_channel_overview(channel,start,end,page,page_size,order_by,order):
  79. sql="""select channel,toString(dt) date,
  80. view_count,click_count,
  81. round(if(view_count=0,0,click_count/view_count),4) click_rate,
  82. follow_user,
  83. round(if(click_count=0,0,follow_user/click_count),4) follow_rate,
  84. round(if(follow_user=0,0,cost/follow_user),2) follow_per_cost,
  85. round(if(click_count=0,0,first_order_count/click_count),4) order_rate,
  86. round(if(first_order_user=0,0,cost/first_order_user),2) order_per_cost,
  87. round(cost,2) cost,
  88. first_order_count,first_order_user,
  89. round(first_order_amount,2) first_order_amount,order_count,order_user,
  90. round(order_amount,2) order_amount,
  91. round(order_amount-first_order_amount,2) old_order_amount,
  92. round(if(first_order_user=0,0,first_order_amount/first_order_user),2) first_amount_per_user,
  93. round(if(follow_user=0,0,first_order_amount/follow_user),2) amount_per_follow,
  94. round(if(first_order_user=0,0,cost/first_order_user),2) first_cost_per_user,
  95. round(if(follow_user=0,0,first_order_user/follow_user),4) new_user_order_rate,
  96. round(reg_order_amount,2) reg_user_amount,
  97. round(total_cost,2) total_cost,
  98. round(total_amount,2) total_amount,
  99. round(if(cost=0,0,first_order_amount/cost),4) day_roi,
  100. round(if(cost=0,0,reg_order_amount/cost),4) all_roi,
  101. 0 avg_new_order_rate,
  102. 0 old_user_once_order_rate from dw_daily_channel where 1=1 """
  103. if channel!='':
  104. sql+=f" and channel='{channel}'"
  105. if start!='':
  106. sql+=f" and start>='{start}'"
  107. if end!='':
  108. sql+=f" and end<='{end}'"
  109. sql += f" order by {order_by} {order} limit {page},{page_size} "
  110. print(sql)
  111. return ck.execute(sql)
  112. def get_channel_again_order_trend(channel,date):
  113. sql=f"""select toString(dt) date,
  114. channel,book,
  115. round(cost,2) cost,
  116. round(reg_order_amount,2) reg_amount,
  117. round(reg_order_amount/cost,4) roi,
  118. follow_user new_follow,
  119. round(cost/follow_user,2) new_follow_per_cost,
  120. reg_order_count reg_count,reg_order_user reg_user,
  121. round(cost/reg_order_user,2) cost_per_user,
  122. round(reg_order_amount/reg_order_user,2) avg_order_amount,
  123. round(reg_order_user2/reg_order_user,4) avg_again_order_rate,
  124. order_count
  125. from dw_daily_channel where channel='{channel}' and dt='{date}'
  126. """
  127. data=ck.execute(sql)
  128. key1=['date','channel','book','cost','reg_amount','roi','new_follow','new_follow_per_cost',
  129. 'reg_count','reg_user','cost_per_user','avg_order_amount','avg_again_order_rate','order_count']
  130. json1=get_dict_list(key1,data)[0]
  131. # print(json1)
  132. sql2="""select
  133. date ,
  134. count(1) c1,
  135. sum(if(count>1,1,0)) c2,
  136. sum(if(count>2,1,0)) c3,
  137. sum(if(count>3,1,0)) c4,
  138. sum(if(count>4,1,0)) c5
  139. from (
  140. select count(1) count,date
  141. from order where channel='玉龙书社' and date>='2020-09-19' and date<=addDays(toDate('2020-09-19'),6)
  142. and formatDateTime(reg_time,'%Y-%m-%d')='2020-09-19' group by user_id,date
  143. ) a group by date"""
  144. df=ck.getData_pd(sql2,[['date','c1','c2','c3','c4','c5']])
  145. # print(df)
  146. reg_user=json1["reg_user"]
  147. li=[]
  148. for i in range(1,5):
  149. d1={}
  150. d1["origin"]=df.iat[0,i]
  151. d1["new"]=0
  152. d1["move"]=df.iat[0,i+1]
  153. d1["now"]=d1["origin"]+d1['new']-d1["move"]
  154. d1["follow_order_rate"]=round(d1["now"]/reg_user,2)
  155. d2={}
  156. d2["origin"] = d1["now"]
  157. d2["new"] = df.iat[1,i]
  158. d2["move"] = df.iat[1, i+1]
  159. d2["now"] = d2["origin"] +d2['new']- d2["move"]
  160. d2["follow_order_rate"] = round(d2["now"] / reg_user, 2)
  161. d3={}
  162. d3["origin"] = d2["now"]
  163. d3["new"] = df.iat[2, i]
  164. d3["move"] = df.iat[2, i+1]
  165. d3["now"] = d3["origin"] +d3['new']- d3["move"]
  166. d3["follow_order_rate"] = round(d3["now"] / reg_user, 2)
  167. d4={}
  168. d4["origin"] = d3["now"]
  169. d4["new"] = df.iat[3, i]
  170. d4["move"] = df.iat[3, i+1]
  171. d4["now"] = d4["origin"] +d4['new']- d4["move"]
  172. d4["follow_order_rate"] = round(d4["now"] / reg_user, 2)
  173. d5={}
  174. d5["origin"] = d4["now"]
  175. d5["new"] = df.iat[4, i]
  176. d5["move"] = df.iat[4, i+1]
  177. d5["now"] = d5["origin"] +d5['new']- d5["move"]
  178. d5["follow_order_rate"] = round(d4["now"] / reg_user, 2)
  179. d6 = {}
  180. d6["origin"] = d5["now"]
  181. d6["new"] = df.iat[5, i]
  182. d6["move"] = df.iat[5, i+1]
  183. d6["now"] = d6["origin"] +d6['new']- d6["move"]
  184. d6["follow_order_rate"] = round(d6["now"] / reg_user, 2)
  185. d7 = {}
  186. d7["origin"] = d6["now"]
  187. d7["new"] = df.iat[6, i]
  188. d7["move"] = df.iat[6, i+1]
  189. d7["now"] = d7["origin"] +d7['new']- d7["move"]
  190. d7["follow_order_rate"] = round(d7["now"] / reg_user, 2)
  191. d={}
  192. d["user_order_count"]=i
  193. d['d1']=d1
  194. d['d2']=d2
  195. d['d3']=d3
  196. d['d4']=d4
  197. d['d5']=d5
  198. d['d6']=d6
  199. d['d7']=d7
  200. li.append(d)
  201. json1['data']=li
  202. return [json1]
  203. def get_channel_active(channel,start,end,page,page_size,order_by,order):
  204. sql=f"""select formatDateTime(a.dt,'%Y-%m-%d') date, '{channel}' channel,book,cost,reg_amount,roi,new_follow_user,new_follow_per_cost,order_user,order_count,
  205. order_user_per_cost,day7_avg_act_rate,day7_avg_act_per_cost,day30_avg_act_rate,ay30_avg_act_cost,
  206. act_per_cost,
  207. concat(toString(reg_order_user1),',',toString(cost/reg_order_user1),',',toString(reg_order_user1/order_user)),
  208. concat(toString(reg_order_user2),',',toString(cost/reg_order_user2),',',toString(reg_order_user2/order_user)),
  209. concat(toString(reg_order_user3),',',toString(cost/reg_order_user3),',',toString(reg_order_user3/order_user)),
  210. concat(toString(reg_order_user4),',',toString(cost/reg_order_user4),',',toString(reg_order_user4/order_user)),
  211. concat(toString(reg_order_user5),',',toString(cost/reg_order_user5),',',toString(reg_order_user5/order_user)),
  212. concat(toString(reg_order_user6),',',toString(cost/reg_order_user6),',',toString(reg_order_user6/order_user)),
  213. concat(toString(reg_order_user7),',',toString(cost/reg_order_user7),',',toString(reg_order_user7/order_user)),
  214. concat(toString(reg_order_user8),',',toString(cost/reg_order_user8),',',toString(reg_order_user8/order_user)),
  215. concat(toString(reg_order_user9),',',toString(cost/reg_order_user9),',',toString(reg_order_user9/order_user)),
  216. concat(toString(reg_order_user10),',',toString(cost/reg_order_user10),',',toString(reg_order_user10/order_user)),
  217. concat(toString(reg_order_user11),',',toString(cost/reg_order_user11),',',toString(reg_order_user11/order_user)),
  218. concat(toString(reg_order_user12),',',toString(cost/reg_order_user12),',',toString(reg_order_user12/order_user)),
  219. concat(toString(reg_order_user13),',',toString(cost/reg_order_user13),',',toString(reg_order_user13/order_user)),
  220. concat(toString(reg_order_user14),',',toString(cost/reg_order_user14),',',toString(reg_order_user14/order_user)),
  221. concat(toString(reg_order_user15),',',toString(cost/reg_order_user15),',',toString(reg_order_user15/order_user)),
  222. concat(toString(reg_order_user16),',',toString(cost/reg_order_user16),',',toString(reg_order_user16/order_user)),
  223. concat(toString(reg_order_user17),',',toString(cost/reg_order_user17),',',toString(reg_order_user17/order_user)),
  224. concat(toString(reg_order_user18),',',toString(cost/reg_order_user18),',',toString(reg_order_user18/order_user)),
  225. concat(toString(reg_order_user19),',',toString(cost/reg_order_user19),',',toString(reg_order_user19/order_user)),
  226. concat(toString(reg_order_user20),',',toString(cost/reg_order_user20),',',toString(reg_order_user20/order_user)),
  227. concat(toString(reg_order_user21),',',toString(cost/reg_order_user21),',',toString(reg_order_user21/order_user)),
  228. concat(toString(reg_order_user22),',',toString(cost/reg_order_user22),',',toString(reg_order_user22/order_user)),
  229. concat(toString(reg_order_user23),',',toString(cost/reg_order_user23),',',toString(reg_order_user23/order_user)),
  230. concat(toString(reg_order_user24),',',toString(cost/reg_order_user24),',',toString(reg_order_user24/order_user)),
  231. concat(toString(reg_order_user25),',',toString(cost/reg_order_user25),',',toString(reg_order_user25/order_user)),
  232. concat(toString(reg_order_user26),',',toString(cost/reg_order_user26),',',toString(reg_order_user26/order_user)),
  233. concat(toString(reg_order_user27),',',toString(cost/reg_order_user27),',',toString(reg_order_user27/order_user)),
  234. concat(toString(reg_order_user28),',',toString(cost/reg_order_user28),',',toString(reg_order_user28/order_user)),
  235. concat(toString(reg_order_user29),',',toString(cost/reg_order_user29),',',toString(reg_order_user29/order_user)),
  236. concat(toString(reg_order_user30),',',toString(cost/reg_order_user30),',',toString(reg_order_user30/order_user))
  237. from (
  238. select dt,book,cost,
  239. reg_order_amount reg_amount,
  240. if(cost=0,0,reg_order_amount/cost) roi,
  241. follow_user new_follow_user,
  242. if(follow_user=0,0,cost/follow_user) new_follow_per_cost,
  243. reg_order_user order_user,
  244. reg_order_count order_count,
  245. if(reg_order_user=0,0,cost/reg_order_user) order_user_per_cost,
  246. if(follow_user=0,0,reg_order_user7/follow_user) day7_avg_act_rate ,
  247. if(reg_order_user7=0,0,cost/reg_order_user7) day7_avg_act_per_cost,
  248. if(follow_user=0,0,reg_order_user30/follow_user) day30_avg_act_rate,
  249. if(reg_order_user30=0,0,cost/reg_order_user30) ay30_avg_act_cost,
  250. if(reg_order_user=0,0,cost/reg_order_user) act_per_cost
  251. from dw_daily_channel where channel='{channel}' and dt>='{start}' and dt<='{end}') a
  252. left outer join (
  253. select toDate(formatDateTime(reg_time,'%Y-%m-%d')) dt,
  254. count(distinct if(subtractDays(date, 1)>reg_time,'',user_id))-1 reg_order_user1,
  255. count(distinct if(subtractDays(date, 2)>reg_time,'',user_id))-1 reg_order_user2,
  256. count(distinct if(subtractDays(date, 3)>reg_time,'',user_id))-1 reg_order_user3,
  257. count(distinct if(subtractDays(date, 4)>reg_time,'',user_id))-1 reg_order_user4,
  258. count(distinct if(subtractDays(date, 5)>reg_time,'',user_id))-1 reg_order_user5,
  259. count(distinct if(subtractDays(date, 6)>reg_time,'',user_id))-1 reg_order_user6,
  260. count(distinct if(subtractDays(date, 7)>reg_time,'',user_id))-1 reg_order_user7,
  261. count(distinct if(subtractDays(date, 8)>reg_time,'',user_id))-1 reg_order_user8,
  262. count(distinct if(subtractDays(date, 9)>reg_time,'',user_id))-1 reg_order_user9,
  263. count(distinct if(subtractDays(date, 10)>reg_time,'',user_id))-1 reg_order_user10,
  264. count(distinct if(subtractDays(date, 11)>reg_time,'',user_id))-1 reg_order_user11,
  265. count(distinct if(subtractDays(date, 12)>reg_time,'',user_id))-1 reg_order_user12,
  266. count(distinct if(subtractDays(date, 13)>reg_time,'',user_id))-1 reg_order_user13,
  267. count(distinct if(subtractDays(date, 14)>reg_time,'',user_id))-1 reg_order_user14,
  268. count(distinct if(subtractDays(date, 15)>reg_time,'',user_id))-1 reg_order_user15,
  269. count(distinct if(subtractDays(date, 16)>reg_time,'',user_id))-1 reg_order_user16,
  270. count(distinct if(subtractDays(date, 17)>reg_time,'',user_id))-1 reg_order_user17,
  271. count(distinct if(subtractDays(date, 18)>reg_time,'',user_id))-1 reg_order_user18,
  272. count(distinct if(subtractDays(date, 19)>reg_time,'',user_id))-1 reg_order_user19,
  273. count(distinct if(subtractDays(date, 20)>reg_time,'',user_id))-1 reg_order_user20,
  274. count(distinct if(subtractDays(date, 21)>reg_time,'',user_id))-1 reg_order_user21,
  275. count(distinct if(subtractDays(date, 22)>reg_time,'',user_id))-1 reg_order_user22,
  276. count(distinct if(subtractDays(date, 23)>reg_time,'',user_id))-1 reg_order_user23,
  277. count(distinct if(subtractDays(date, 24)>reg_time,'',user_id))-1 reg_order_user24,
  278. count(distinct if(subtractDays(date, 25)>reg_time,'',user_id))-1 reg_order_user25,
  279. count(distinct if(subtractDays(date, 26)>reg_time,'',user_id))-1 reg_order_user26,
  280. count(distinct if(subtractDays(date, 27)>reg_time,'',user_id))-1 reg_order_user27,
  281. count(distinct if(subtractDays(date, 28)>reg_time,'',user_id))-1 reg_order_user28,
  282. count(distinct if(subtractDays(date, 29)>reg_time,'',user_id))-1 reg_order_user29,
  283. count(distinct if(subtractDays(date, 30)>reg_time,'',user_id))-1 reg_order_user30
  284. from order where channel='{channel}' and dt>='{start}' group by formatDateTime(reg_time,'%Y-%m-%d')) b on a.dt=b.dt
  285. order by {order_by} {order} limit {page},{page_size}
  286. """
  287. data=ck.execute(sql)
  288. key=['date','channel','book','cost','reg_amount','roi','new_follow_user','new_follow_per_cost','order_user','order_count','order_user_per_cost',
  289. 'day7_avg_act_rate','day7_avg_act_per_cost','day30_avg_act_rate','day30_avg_act_cost','act_per_cost','d1','d2','d3','d4','d5','d6','d7','d8','d9','d10',
  290. 'd11','d12','d13','d14','d15','d16','d17','d18','d19','d20','d21','d22','d23','d24','d25','d26','d27','d28','d29','d30']
  291. x=get_dict_list(key,get_round(data))
  292. li=[]
  293. for i in x:
  294. di = {}
  295. for j in i:
  296. if j in ['d1','d2','d3','d4','d5','d6','d7','d8','d9','d10',
  297. 'd11','d12','d13','d14','d15','d16','d17','d18','d19','d20','d21','d22','d23','d24','d25','d26','d27','d28','d29','d30']:
  298. k=i[j].split(",")
  299. k[0]=round(float(k[0]),0)
  300. k[1]=round(float(k[1]),2)
  301. k[2]=round(float(k[2]),4)
  302. di[j]= dict(zip(['act_user','act_cost_per_cost','act_rate'],k))
  303. else:
  304. di[j]=i[j]
  305. li.append(di)
  306. return li
  307. def get_channel_order_trend(channel,start,end):
  308. a=[{
  309. 'date': '2020-12-01',
  310. 'channel': '宝珠书屋',
  311. 'book': '魏汝稳',
  312. 'cost': 234.11,
  313. 'reg_amount': 123.11,
  314. 'roi': 0.45,
  315. 'new_follow_user': 11,
  316. 'new_follow_per_cost': 234.11,
  317. 'order_user': 222,
  318. 'order_count': 12312,
  319. 'order_user_per_cost': 123.11,
  320. 'd1':{
  321. 'order':232.11,
  322. 'roi':0.2341,
  323. 'add':0.4511,
  324. 'mult':1.12},
  325. 'd2': {
  326. 'order': 232.11,
  327. 'roi': 0.2341,
  328. 'add': 0.4511,
  329. 'mult': 1.12},
  330. 'd3': {
  331. 'order': 232.11,
  332. 'roi': 0.2341,
  333. 'add': 0.4511,
  334. 'mult': 1.12},
  335. }]
  336. return a
  337. def get_channel_summary(channel,pitcher):
  338. sql = """select a.channel,state,'朋友圈' location,toString(start),toString(end),total_cost,total_amount,
  339. profit,roi,follow_user,follow_per_cost,order_user,
  340. if(follow_user=0,0,order_user/follow_user) order_tran_rate,if(order_user=0,0,total_cost/order_user) order_tran_cost
  341. from
  342. (
  343. select channel,if(max(dt)>subtractDays(today(),10),'在投','停投') state,
  344. min(dt) start,max(dt) end
  345. from dw_daily_channel_cost where cost>0 {} group by channel) a
  346. left outer join(
  347. select channel,sum(follow_user) follow_user,
  348. if(follow_user=0,0,sum(cost)/follow_user) follow_per_cost
  349. from dw_daily_channel group by channel) b on a.channel=b.channel
  350. left outer join(
  351. select sum(reg_order_user) order_user,channel from dw_daily_channel where dt=subtractDays(today(),1) group by channel) c on a.channel=c.channel
  352. left outer join (
  353. select total_cost,
  354. total_amount,
  355. channel,
  356. total_amount-total_cost profit,
  357. if(total_cost=0,0,total_amount/total_cost) roi
  358. from dw_channel_daily_total where dt=subtractDays(today(),1)) d on a.channel=d.channel
  359. where 1=1 """
  360. if pitcher!='':
  361. sql=sql.format(f" and pitcher='{pitcher}'")
  362. else:
  363. sql=sql.format('')
  364. if channel!='':
  365. sql+=f" and channel='{channel}'"
  366. return ck.execute(sql)
  367. if __name__ == '__main__':
  368. # a=get_channel_overview('','','',1,10,'date','desc')
  369. # a=get_channel_summary('','')
  370. # a=get_channel_again_order_trend('玉龙书社','2020-09-19')
  371. a=get_channel_active('玉龙书社','2020-09-15','2020-09-20',1,10,'date','desc')
  372. print(a)