--title覲 螳 customer_id fname 譟壱 select distinct on (title) title , customer_id, fname from (select * from customer order by title, customer_id desc) t
psql mydb < dump.sql psql mydb -f dump.sql psql -d mydb -f dump.sql or psql -f dump.sql mydb psql [database name] < [script name] testdb=# \i [script name]