LTirrell2023-08-11 12:08 AM copy
Updated 2023-08-11
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with
x as (
select
column1 as i,
column2 as v
from
values
(1.1, 1),
(2, 0),
(1.12, 12),
(1.11, 11),
(0.8, 8),
(1.8, 8),
(0.12, 12),
(1.2, 2),
(0.4, 4),
(3.7, 7),
(3.12, 12),
(2.10, 10),
(2.1, 1),
(4.0, 0),
(4, 0)
as vals
)
select
i,
i::string,
i::float,
i::number,
i::float::string as j,
split(j, '.'),
split(i, '.') as x,
split_part(i::float, '.', 1)::int as num,
case
when contains(i::float::string, '.') then split_part(i::float, '.', 2)::int
else 0
Run a query to Download Data