Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
statistics
drop table if exists my_table; create table my_table(id serial primary key, event_id integer, answers jsonb); insert into my_table (event_id, answers) values (10, '{"colores": ["Rojo", "Verde", "Azul"]}'::jsonb), (10, '{"colores": ["Amarillo", "Verde"]}'), (10, '{"colores": ["Azul"]}'), (10, '{"maderas": ["pino"]}'); SELECT jsonb_array_elements_text(answers->'colores') AS colores, count(id) FROM my_table WHERE event_id = 10 GROUP BY colores;
run
|
edit
|
history
|
help
0
Q2
Social Network SQL
Timestamps in PostgreSQL
1
postgresql: working days
Assignment 1(SET A)
Update as a function result
PostreSQL: Full Outer Join
loggin_trigger-audit
fgf