druid的SQL查询中时间的格式化

2020-11-20 18:18:00 by wst

database

前言

druid查询支持SQL,对于从MySQL使用者转过来的用户特别友好。

但在现实使用当中,经常需要算日活、周活、月活之类的指标。

此时则需要把时间格式化成日、周、月。

这里列出常用的转化函数及示例:

格式化为年月日

 

格式化为天

__time为druid中存储时间的字段

TIME_FORMAT(__time,'Y-MM-dd')

 

格式化为周

其实为格式化为周的第一天

TIME_FORMAT(DATE_TRUNC('week',__time),'Y-MM-dd')

 

格式化为月

其实为格式化为月的第一天

TIME_FORMAT(DATE_TRUNC('month',__time),'Y-MM-dd')

 

格式化为其他时间

 

格式化为小时

TIME_FORMAT(__time,'Y-MM-dd H:0:0')

 

格式化为分钟

TIME_FORMAT(__time,'Y-MM-dd H:m:0')

 

如果你发现了更好用的方法,请留言!


Comments(133) Add Your Comment

Charlesnag
“I haven’t seen you in these parts,” the barkeep said, sidling during to where I sat. “Repute’s Bao.” He stated it exuberantly, as if solemn word of honour of his exploits were shared by means of settlers hither multifarious a firing in Aeternum. He waved to a unimpassioned hogshead hard by us, and I returned his gesture with a nod. He filled a eyeglasses and slid it to me across the stained red wood of the bar before continuing. “As a betting houseman, I’d be ready to wager a honourable bit of coin you’re in Ebonscale Reach for more than the swig and sights,” he said, eyes glancing from the sword sheathed on my with it to the bend slung across my back. https://www.google.es/url?q=https://renewworld.ru/otlichie-new-world-versii-deluxe-i-standart-edition/
Kevingaw
http://maps.google.co.ke/url?q=http://1xbitapp.org/index.html http://www.google.com.ec/url?sa=t&rct=j&q=derritela+de+amor&esrc=s&source=web&cd=1&cad=rja&ved=0ahUKEwiw-Iryg_7LAhVBQSYKHTAtAjIQFggaMAA&url=http://team75motorsport.de/wp-content/pages/gibt_es_ein_kasino_in_polen__erlaubte_kasinos_und_wettanbieter_in_polen.html http://images.google.cv/url?q=http://band-merch.de/wp-content/pages/wie_man_ein_online_casino_oder_einen_verdopplungsplan__berlistet.html https://images.google.tl/url?q=https://www.simacek.com/present/inc/wie_man_ein_casino_online_schl_gt__clevere_tipps_f_r_anf_nger_und_erfahrene_spieler.html https://www.stadt-berga.de/wp-includes/pgs/?welches_casino_zahlt_am_schnellsten_aus____top_5_online_casinos_mit_guter_rendite_2022.html
Kevingaw
http://dolce-vita.com/wp-content/pages/welche_kasinos_gewinnen_.html http://www.google.sk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=172&ved=0CCMQFjABOKoB&url=https://schlossgut.de/news/welche_online_casinos_sind_in_deutschland_legal__1.html https://images.google.com.uy/url?q=https://www.stadt-berga.de/wp-includes/pgs/?welches_casino_zahlt_am_schnellsten_aus____top_5_online_casinos_mit_guter_rendite_2022.html https://www.simacek.com/present/inc/wie_man_ein_casino_online_schl_gt__clevere_tipps_f_r_anf_nger_und_erfahrene_spieler.html http://tanzschule-schrittfest.de/wp-content/pages/welche_online_casinos_sind_in_deutschland_legal__2.html
Cwisgd
purchase lipitor pills <a href="https://lipiws.top/">lipitor 80mg pill</a> brand lipitor 80mg
Cnnxwc
ciprofloxacin 1000mg brand - <a href="https://cipropro.top/bactrimos/">buy cheap trimethoprim</a> buy amoxiclav online
Brqhqf
ciprofloxacin over the counter - <a href="https://metroagyl.top/keflexcapsule/">how to buy keflex</a> order augmentin 1000mg sale
Rcsmda
buy metronidazole 200mg for sale - <a href="https://metroagyl.top/cefaclor/">order cefaclor generic</a> azithromycin over the counter
Nangwi
where to buy ciprofloxacin without a prescription - <a href="https://septrim.top/erythromycin/">order erythromycin 500mg sale</a> erythromycin 250mg price
Yayotw
order valtrex 1000mg pill - <a href="https://gnantiviralp.com/">valtrex 500mg usa</a> order generic zovirax 400mg
Rutbmb
ivermectin 6 mg without prescription - <a href="https://keflexin.top/cefixime/">buy cefixime sale</a> order tetracycline 500mg online
Gctzjg
flagyl brand - <a href="https://metroagyl.top/cefaclor/">buy cefaclor 500mg without prescription</a> buy azithromycin 500mg online
Hbwbgv
cheap acillin <a href="https://ampiacil.top/doxycyclineantb/">order vibra-tabs generic</a> amoxicillin pill
Mnpjkx
buy furosemide online cheap diuretic - <a href="https://antipathogenc.com/medex/">coumadin pill</a> captopril 25mg canada
Pdqlfx
glycomet cost - <a href="https://gnantiacidity.com/baycip/">order ciprofloxacin 1000mg without prescription</a> brand lincocin
Ubksmf
buy retrovir 300 mg generic - <a href="https://canadiangnp.com/rulide/">buy generic rulide</a> cost allopurinol 300mg
Xhyrqv
clozapine buy online - <a href="https://genonlinep.com/altace/">order altace 10mg generic</a> buy famotidine 40mg online cheap
Osekas
order quetiapine 100mg online cheap - <a href="https://gnkantdepres.com/bupron/">buy generic bupron SR</a> buy eskalith without a prescription
Iouqaz
buy anafranil medication - <a href="https://antdeponline.com/">anafranil 50mg pills</a> cost sinequan 25mg
Wywrhg
order hydroxyzine 25mg generic - <a href="https://antdepls.com/prozac/">buy prozac pill</a> how to get endep without a prescription
Qanvwj
generic augmentin 375mg - <a href="https://atbioinfo.com/">buy generic augmentin for sale</a> ciprofloxacin 500mg pills
Wajvty
purchase amoxicillin sale - <a href="https://atbioxotc.com/trimox/">trimox without prescription</a> cipro 1000mg sale
Fkzybo
generic cleocin 300mg - <a href="https://cadbiot.com/cefpodoxime/">cefpodoxime 200mg sale</a> how to get chloramphenicol without a prescription
Yabwtx
zithromax 250mg us - <a href="https://gncatbp.com/dofloxacin/">ofloxacin 200mg without prescription</a> order ciplox 500mg sale
Akxlug
ivermectin tablets - <a href="https://antibpl.com/">ivermectin 12mg otc</a> cost cefaclor 500mg
Ypfety
best antihistamine for allergic rhinitis - <a href="https://antxallergic.com/advairdiskus/">fluticasone brand</a> buy generic theophylline 400 mg
Lalesf
purchase clarinex generic - <a href="https://rxtallerg.com/getzaditor/">purchase zaditor generic</a> purchase albuterol
Cctmck
depo-medrol online pharmacy - <a href="https://ntallegpl.com/getcetirizine/">buy cheap zyrtec</a> astelin usa
Vyyukl
buy micronase 2.5mg without prescription - <a href="https://prodeprpl.com/glipizide10/">order glucotrol 5mg online</a> dapagliflozin for sale
Dxurur
order prandin online cheap - <a href="https://depressinfo.com/">prandin 2mg over the counter</a> jardiance sale
Yovvwd
order glucophage 1000mg online - <a href="https://arxdepress.com/sitagliptin50/">order sitagliptin without prescription</a> acarbose uk
Vpgfle
terbinafine 250mg drug - <a href="https://treatfungusx.com/fulvicin250mg/">how to buy fulvicin</a> order grifulvin v generic
Wpuoyl
rybelsus 14 mg sale - <a href="https://infodeppl.com/glucovance5/">where can i buy glucovance</a> order DDAVP generic
Nmpboh
order generic ketoconazole 200 mg - <a href="https://antifungusrp.com/butenafinecream/">butenafine without prescription</a> itraconazole us
Rzdjes
order famciclovir for sale - <a href="https://amvinherpes.com/gnvalaciclovir/">cost valaciclovir</a> valcivir drug
Mdwtup
oral digoxin 250 mg - <a href="https://blpressureok.com/dipyridamole100/">buy dipyridamole 25mg for sale</a> lasix 40mg without prescription
Ufjtgl
cheap microzide - <a href="https://norvapril.com/bisoprolol/">zebeta pills</a> buy cheap zebeta
Rardek
lopressor oral - <a href="https://bloodpresspl.com/hyzaar/">order cozaar 50mg generic</a> nifedipine 10mg us
Gezeel
nitroglycerin where to buy - <a href="https://nitroproxl.com/valsartan/">buy valsartan for sale</a> where can i buy diovan
Ipyrfz
crestor online wing - <a href="https://antcholesterol.com/ezetimibe/">ezetimibe leg</a> caduet buy pay
Tjeotp
zocor main - <a href="https://canescholest.com/atorvastatin/">lipitor chain</a> lipitor order
Oagspt
buy viagra professional dirty - <a href="https://edsildps.com/cialisprofessional/">buy cialis professional safety</a> levitra oral jelly online anger
Ghdmac
priligy dare - <a href="https://promedprili.com/cialiswithdapoxetine/">cialis with dapoxetine white</a> cialis with dapoxetine bitter
Isgvbw
cenforce online waste - <a href="https://xcenforcem.com/silagrasildenafil/"></a> brand viagra necessary
Avzbgz
brand cialis pit - <a href="https://probrandtad.com/tadorapills/">tadora result</a> penisole bounce
Xhhufi
cialis soft tabs aware - <a href="https://supervalip.com/viagrasuperactive/">viagra super active balance</a> viagra oral jelly online move
Agathw
brand cialis stick - <a href="https://probrandtad.com/apcalissx/">apcalis thump</a> penisole since
Mtjvmh
cialis soft tabs online guide - <a href="https://supervalip.com/cialisoraljelly/">cialis oral jelly spray</a> viagra oral jelly online freeze
Svxwcl
cenforce vim - <a href="https://xcenforcem.com/tadalissxtadalafil/">tadalis online absurd</a> brand viagra pills problem
Ikfkru
acne medication bury - <a href="https://placnemedx.com/">acne treatment below</a> acne treatment since
Lxxxuk
asthma treatment troll - <a href="https://bsasthmaps.com/">inhalers for asthma involve</a> inhalers for asthma woman
Xgbobd
uti medication again - <a href="https://amenahealthp.com/">uti medication twist</a> uti treatment believe
Elwage
pills for treat prostatitis consult - <a href="https://xprosttreat.com/">prostatitis treatment conversation</a> prostatitis pills waste
Yorubt
valacyclovir pills silk - <a href="https://gnantiviralp.com/">valacyclovir online crackle</a> valacyclovir pills assemble
Qixrfo
loratadine medication deliver - <a href="https://clatadine.top/">loratadine those</a> loratadine medication hit
Lawvcc
dapoxetine such - <a href="https://prilixgn.top/">priligy bolt</a> dapoxetine ought
Rpaihb
claritin undoubted - <a href="https://clatadine.top/">loratadine tournament</a> claritin pills respect
Twdomb
promethazine drown - <a href="https://prohnrg.com/">promethazine discussion</a> promethazine nameless
Zamwmd
ascorbic acid bloom - <a href="https://ascxacid.com/">ascorbic acid wrinkle</a> ascorbic acid extraordinary
Dvlbco
biaxin upward - <a href="https://gastropls.com/gncytotec/">cytotec rouse</a> cytotec pills demand
Abykyb
florinef barrel - <a href="https://gastroplusp.com/omepprilosec/">prilosec woman</a> prevacid waist
Nkfgjl
dulcolax 5 mg over the counter - <a href="https://gastroinfop.com/liv52/">liv52 20mg usa</a> liv52 20mg without prescription
Qlzhvi
rabeprazole medication - <a href="https://gastrointesl.com/">rabeprazole 10mg price</a> motilium tablet
Xuewzy
purchase bactrim sale - <a href="https://tobmycin.com/">order tobra online cheap</a> cost tobrex 5mg
Ivqpnm
zovirax medication - <a href="https://danaterone.shop/">buy generic zovirax</a> duphaston for sale
Quwqdm
order forxiga 10 mg generic - <a href="https://precarbos.com/">buy precose 50mg for sale</a> buy acarbose pills for sale
Rkacbw
order fulvicin 250 mg for sale - <a href="https://fulviseoful.com/">cheap griseofulvin</a> pill gemfibrozil
Uvxscx
dimenhydrinate tablet - <a href="https://actodronate.com/">order risedronate</a> risedronate 35mg drug
Qlzfzz
vasotec sale - <a href="https://doxapisin.com/">pill doxazosin 2mg</a> cost xalatan
Tucjxj
etodolac online - <a href="https://etodograph.com/">etodolac 600 mg sale</a> order cilostazol 100 mg generic
Ncaoax
purchase piroxicam generic - <a href="https://rivastilons.com/">rivastigmine 3mg generic</a> exelon 6mg drug
Bjxiaa
purchase nootropil pill - <a href="https://nootquin.com/">order piracetam sale</a> order generic sinemet
Jjumkd
buy hydroxyurea pills - <a href="https://hydroydrinfo.com/methocarbamol/">how to get robaxin without a prescription</a> buy robaxin without prescription
Mnockh
depakote uk - <a href="https://adepamox.com/amiodarone/">order cordarone 100mg pills</a> cheap topamax 200mg
Wkefip
cheap norpace - <a href="https://anorpica.com/lamotrigine/">buy generic lamotrigine online</a> buy chlorpromazine 50 mg
Hlhfee
cyclophosphamide tablet - <a href="https://cycloxalp.com/atomoxetine/">buy strattera generic</a> buy trimetazidine generic
Omxzpg
oral spironolactone - <a href="https://aldantinep.com/carbamazepine/">order epitol sale</a> buy revia tablets
Gnhirs
flexeril cost - <a href="https://abflequine.com/">where to buy flexeril without a prescription</a> enalapril price
Mptrta
order generic zofran - <a href="https://azofarininfo.com/oxybutynin/">oxytrol oral</a> purchase requip pill
Qyebpm
buy ascorbic acid sale - <a href="https://mdacidinfo.com/prochlorperazine/">cheap prochlorperazine generic</a> buy compro online
Ydnybc
durex gel online purchase - <a href="https://xalaplinfo.com/durexcondoms/">durex condoms where to buy</a> buy latanoprost eye drops
Yusxrg
order minoxidil generic - <a href="https://hairlossmedinfo.com/finasteridefinp/">cheap finpecia for sale</a> propecia 1mg cheap
Ffynju
leflunomide sale - <a href="https://infohealthybones.com/calciumcarbonate/">cheap calcium carbonate</a> cartidin over the counter
Sipabn
atenolol for sale online - <a href="https://heartmedinfox.com/sotalol/">betapace 40mg cheap</a> order coreg 25mg generic
Gdhsei
order calan 240mg online cheap - <a href="https://infoheartdisea.com/valsartan/">valsartan buy online</a> order tenoretic pill
Wpgzdl
purchase atorvastatin - <a href="https://infoxheartmed.com/nebivolol/">bystolic oral</a> nebivolol 20mg without prescription
Alyriw
buy lasuna tablets - <a href="https://infoherbalmz.com/himcolin/">purchase himcolin online cheap</a> himcolin order online
Nfcwsh
order noroxin pill - <a href="https://gmenshth.com/confido/">purchase confido online</a> buy cheap generic confido
Gjuxsy
buy generic speman online - <a href="https://spmensht.com/finasteride/">buy generic finasteride</a> order finasteride pill
Qzghpa
where to buy finasteride without a prescription - <a href="https://finmenura.com/">cheap finax</a> alfuzosin sale
Hdoxhh
order hytrin 5mg pills - <a href="https://hymenmax.com/">buy hytrin 1mg generic</a> buy dapoxetine 30mg pill
Bvrdyg
oxcarbazepine 600mg uk - <a href="https://trileoxine.com/">oxcarbazepine 600mg pills</a> cheap generic levoxyl
Corgli
where to buy imusporin without a prescription - <a href="https://asimusxate.com/">cyclosporine without prescription</a> colchicine where to buy
Sbtsgk
lactulose usa - <a href="https://duphalinfo.com/betahistine/">purchase betahistine without prescription</a> betahistine 16 mg without prescription
Kaxija
how to get calcort without a prescription - <a href="https://lazacort.com/">buy calcort tablets</a> purchase alphagan without prescription
Drmbqn
besifloxacin order - <a href="https://besifxcist.com/sildamax/">sildamax brand</a> buy sildamax
Nylnib
probenecid pills - <a href="https://bendoltol.com/carbamazepine/">purchase tegretol online</a> tegretol 200mg uk
Yxxwvs
gabapentin 800mg usa - <a href="https://aneutrin.com/sulfasalazine/">buy azulfidine cheap</a> order azulfidine 500mg pills
Xjeouz
buy generic mebeverine - <a href="https://coloxia.com/">mebeverine 135 mg ca</a> cost cilostazol 100mg
Yffugr
generic celebrex 100mg - <a href="https://celespas.com/indomethacin/">buy indocin 75mg capsule</a> indocin 50mg uk
Digiio
order rumalaya generic - <a href="https://rumaxtol.com/shallaki/">buy generic shallaki for sale</a> amitriptyline 50mg pills
Xfoxfu
purchase diclofenac sale - <a href="https://dicloltarin.com/">buy cambia without a prescription</a> buy aspirin 75 mg for sale
Nntshw
order voveran without prescription - <a href="https://vovetosa.com/">order diclofenac without prescription</a> cheap nimodipine generic
Iurbei
buy generic pyridostigmine - <a href="https://mestonsx.com/azathioprine/">buy azathioprine medication</a> order azathioprine without prescription
Rnaoqq
baclofen 25mg canada - <a href="https://baclion.com/nspiroxicam/">order generic feldene 20 mg</a> piroxicam 20mg us
Wdtxzs
meloxicam pills - <a href="https://meloxiptan.com/">oral mobic 7.5mg</a> toradol 10mg drug
Mhygrt
buy periactin for sale - <a href="https://periheptadn.com/aszanaflex/">buy zanaflex for sale</a> cheap tizanidine
Dlursi
brand artane - <a href="https://voltapll.com.com/">buy cheap generic trihexyphenidyl</a> where can i order voltaren gel
Yvjvyy
omnicef 300 mg uk - <a href="https://omnixcin.com/aminocycline/"></a> buy cheap generic cleocin
Pltlsx
acticin generic - <a href="https://actizacs.com/asbenzac/">oral benzac</a> tretinoin gel for sale
Ipzoqp
deltasone 10mg price - <a href="https://apreplson.com/prednisolone/">omnacortil 10mg cost</a> permethrin us
Kkjiso
how to buy flagyl - <a href="https://cenforcevs.com/">buy cenforce sale</a> buy cenforce 50mg pills
Jlyzba
order betamethasone 20gm sale - <a href="https://betnoson.com/">order betnovate 20 gm generic</a> buy monobenzone without a prescription
Vhddit
augmentin 1000mg ca - <a href="https://baugipro.com/">oral augmentin</a> cheap synthroid generic
Hbxqul
how to buy cleocin - <a href="https://clinycinpl.com/">cleocin usa</a> buy generic indomethacin
Dzqcco
crotamiton without prescription - <a href="https://aeuracream.com/caczone/">buy aczone without a prescription</a> aczone sale
Uchqcz
order losartan 50mg pill - <a href="https://cozartan.com/">purchase losartan for sale</a> generic cephalexin 125mg
Zhzyis
bupropion 150 mg oral - <a href="https://bupropsl.com/orlistat/">order orlistat 60mg without prescription</a> shuddha guggulu pill
Areyde
modafinil ca - <a href="https://sleepagil.com/melatonin/">where can i buy melatonin</a> meloset 3mg uk
Tnrgkl
order generic progesterone 200mg - <a href="https://apromid.com/clomipheneferto/">order clomiphene pill</a> fertomid tablet
Hmcauv
buy xeloda 500 mg without prescription - <a href="https://xelocap.com/mefenamicacid/">ponstel for sale online</a> buy danocrine generic
Nrjivw
norethindrone 5 mg cost - <a href="https://norethgep.com/">buy generic norethindrone 5 mg</a> buy yasmin tablets
Pnethq
buy fosamax 35mg generic - <a href="https://pilaxmax.com/tamoxifen/">nolvadex 20mg canada</a> provera order
Ilnigc
buy dostinex pills - <a href="https://adostilin.com/">purchase dostinex</a> alesse tablet
Qrvanv
order estradiol 1mg generic - <a href="https://festrolp.com/ginette-35/">ginette 35 uk</a> buy generic anastrozole over the counter
Uvuoft
г‚·гѓ«гѓ‡гѓЉгѓ•г‚Јгѓ«йЂљиІ© - <a href="https://jpedpharm.com/">г‚·гѓ«гѓ‡гѓЉгѓ•г‚Јгѓ«гЃ®йЈІгЃїж–№гЃЁеЉ№жћњ</a> г‚їгѓЂгѓ©гѓ•г‚Јгѓ« - 50mg/100mg
Mkxgyu
プレドニンは薬局で買える? - <a href="https://jpaonlinep.com/jazithromycin/">正規品ジスロマック錠の正しい処方</a> ジスロマック どこで買える
Tkpcex
eriacta height - <a href="https://eriagra.com/">eriacta precious</a> forzest indeed
Lxpdgm
プレドニン 市販 おすすめ - <a href="https://jpanfarap.com/jpaaccutane/">イソトレチノイン錠 20 mg 強さ</a> アキュテイン錠 40 mg 強さ
Ktvehq
generic indinavir - <a href="https://confindin.com/emulgel/">buy diclofenac gel cheap</a> purchase voltaren gel online cheap
Ztscix
purchase provigil - <a href="https://provicef.com/lamivudine/">generic lamivudine</a> purchase combivir
Tzlzda
valif online annoy - <a href="https://avaltiva.com/tysecnidazolef/">buy generic secnidazole</a> sinemet drug
Omcndy
buy stromectol canada - <a href="https://ivercand.com/candesartan/">buy atacand without prescription</a> tegretol 400mg drug
Dftccb
brand promethazine - <a href="https://prometacin.com/jilincomycin/">buy lincomycin tablets</a> order lincocin 500mg