I have an table with data like these:
id | name | value
12 | KREA | 3,7
13 | KREA | 12.6
12 | GFR | 2.2
13 | GFR | 1.7
Now I want to get the name and value of krea and gfr in one column like this:
id | name1 | value1 | name2 | value2
12 | KREA | 3.7 | GFR | 2.2
...
I have tried to make an join but it didn't work.
select rps1.id, rps1.name, rps1.value, rps2.id, rps2.name, rps2.value
from table1 rps1, table1 rps2
where rps1.name like 'KREA'
or rps2.name like 'GRFR' and rps1.id = rps2.id
and crd > '17.07.2019 00:00:00' order by id
Can anyone tell me what I am doing wrong? Thanks in advance! :)
... From t1, t2 ...