Check out example codes for "sql to excel pgadmin". It will help you in understanding the concepts better.

Code Example 1

COPY albums TO '/Users/dave/Downloads/albums.csv' DELIMITER ',' CSV HEADER;

Learn ReactJs, React Native from akashmittal.com