I am very new to postgresql. I have this table.
From this table I want the data like
region country count
---------------------------------------------------
UttarPradesh India 16
California United State 2
How to achieve this task. I did something but not properly end with the solution here is my queries
CREATE TEMP TABLE temp1 AS
(SELECT distinct region_name, country_name, null::integer as "count"
from opens where track_id=42);
After this I read this result then in a loop run update query with select statement.
So it is a right way ? Or any another way to achieve this task ?
