Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
All versions of PostgreSQL. Add an additional version-specific tag like [postgresql-13] if that context is relevant.
5
votes
Accepted
Select Distinct on subset of columns, name different set of columns to return
You're almost there. SELECT DISTINCT returns that group of columns, as you've found out. If you use DISTINCT ON instead though, you'll get the rows you're looking for.
INSERT INTO Table_A
(colA, …
0
votes
4
answers
5k
views
Insert from Another Table + Removing Duplicate Entries in Postgres
I'm trying to insert data from one PostgreSQL table to another while removing duplicate entries but I'm having some trouble with the code. …