TDengine/tests/army/query/function/ans/rand.csv
2025-02-10 20:24:21 +08:00

173 lines
5 KiB
Text

taos> select RAND(1245)
rand(1245) |
============================
0.663936012733698 |
taos> select RAND(id) from ts_4893.d0 limit 10
rand(id) |
============================
0.84018771715471 |
0.84018771715471 |
0.700976369297587 |
0.561380175203728 |
0.916457875592847 |
0.274745596235034 |
0.135438768721856 |
0.486904139391568 |
0.352760728612896 |
0.206965447965528 |
taos> select RAND(id) from ts_4893.d0 order by id desc limit 10
rand(id) |
============================
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
taos> select rand(0)
rand(0) |
============================
0.84018771715471 |
taos> select rand(1)
rand(1) |
============================
0.84018771715471 |
taos> select rand(-1)
rand(-1) |
============================
0.118708995691831 |
taos> select rand(12345678901234567890)
rand(12345678901234567890) |
=============================
2.008294813338805e-01 |
taos> select rand(-12345678901234567890)
rand(-12345678901234567890) |
==============================
8.401877171547095e-01 |
taos> select rand(12345), rand(12345)
rand(12345) | rand(12345) |
========================================================
0.178395304446293 | 0.178395304446293 |
taos> select rand(9999999999) where rand(9999999999) >= 0 and rand(9999999999) < 1
rand(9999999999) |
============================
0.32140939744255 |
taos> select rand(id) from ts_4893.meters limit 100
rand(id) |
============================
0.84018771715471 |
0.84018771715471 |
0.700976369297587 |
0.561380175203728 |
0.916457875592847 |
0.274745596235034 |
0.135438768721856 |
0.486904139391568 |
0.352760728612896 |
0.206965447965528 |
0.565810732341283 |
0.926345318521534 |
0.785600282617658 |
0.632643183056565 |
0.999498499557142 |
0.354973177125199 |
0.215437470104283 |
0.571794000254848 |
0.929072778173291 |
0.29023338541865 |
0.14881226753295 |
0.505899571117898 |
0.865026922367991 |
0.727581746283724 |
0.0877142292855839 |
0.939356191986872 |
0.795545781867367 |
0.659832971943465 |
0.517155105023251 |
0.875989373715589 |
0.22996707504148 |
0.592119012303706 |
0.449675684072858 |
0.307948935454688 |
0.16897002149791 |
0.524489704763745 |
0.381259786142623 |
0.239412393066758 |
0.598226357529977 |
0.957148446215851 |
0.819422913165494 |
0.670246056127477 |
0.0334699480018904 |
0.392149003405193 |
0.749737140606035 |
0.60892398031844 |
0.469695958061933 |
0.825680229266025 |
0.683865774275673 |
0.0418115835831555 |
0.894321223206036 |
0.76058037288514 |
0.615916447069457 |
0.977703406930763 |
0.32953763395992 |
0.19352296283167 |
0.0520212943907926 |
0.911150676622591 |
0.766549994129012 |
0.126697651635249 |
0.9853164227611 |
0.84317340834214 |
0.699550600116863 |
0.557263156192965 |
0.41979416106818 |
0.278590486048996 |
0.133239280028846 |
0.488706417143674 |
0.854142372894167 |
0.710721029765308 |
0.570226699379378 |
0.424855420563768 |
0.283543675338637 |
0.137892492179709 |
0.998458440880505 |
0.356983164025928 |
0.218767986269094 |
0.0764689082635888 |
0.431104593179703 |
0.293163777931204 |
0.65012374690274 |
0.510736836358317 |
0.864335399057872 |
0.725284450559544 |
0.0856771492798241 |
0.942077809917777 |
0.798407114482674 |
0.163865051774245 |
0.0179957677694018 |
0.879516513030751 |
0.736922031145972 |
0.589669372695344 |
0.954449085497507 |
0.811225361568493 |
0.172090128609953 |
0.52515305603163 |
0.386470556904781 |
0.744990266275122 |
0.100015020510189 |
0.460091779222755 |