[GENERAL] import .sql file into PostgreSQL database

2014-04-07 Thread Gaurav Jindal
How to import the .sql file using PSQL or PgAdmin? Can anyone guide me with details and step by step instructions. I tried \i filename.sql command but permission denied. I don't know how to make it work. Can anyone helps me out. Thanks! Gaurav

[GENERAL] Need query

2014-04-11 Thread Gaurav Jindal
Can anybody help me with query- I have 3 tables- a,b,c a has relation with b and b has relation with c a does not have a relation with c I need to find top performing item in table 'a'. It is based on count. If more count, it is top performing. We can count only based on actions in table 'c'. I