3,765
回編集
差分
Tep3-onk
,→postgres
=# select distinct on (jiin_id) * from clients;
テーブルをコピーしてデータを加工する <nowiki>=# CREATE TABLE jq_clients AS SELECT * FROM clients where jiin_id = 1;SELECT 3066</nowiki> <nowiki>=# COPY (SELECT user_id,jiin_id,ie_id,name,yomi,nusi,each_order,memo,generation,created_at,updated_at FROM clients jq_clients WHERE jiin_id = 1) TO '/Users/jq/rails_app_tepnote/jq_clients.csv' WITH CSV HEADER;
COPY 3066</nowiki>