Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Spelling change "frist" -> "first"
Source Link
JK.
  • 21.6k
  • 35
  • 139
  • 222

if you have an unique id in the table, then i would go for something like this:

 SELECT A,B,C,D FROM table WHERE id IN (SELECT DISTINCT A,B,D) 

The problem is that you would always get the first value of C, not the fristfirst one with an value.

if you have an unique id in the table, then i would go for something like this:

 SELECT A,B,C,D FROM table WHERE id IN (SELECT DISTINCT A,B,D) 

The problem is that you would always get the first value of C, not the frist one with an value.

if you have an unique id in the table, then i would go for something like this:

 SELECT A,B,C,D FROM table WHERE id IN (SELECT DISTINCT A,B,D) 

The problem is that you would always get the first value of C, not the first one with an value.

Source Link
SvenFinke
  • 1.3k
  • 3
  • 15
  • 30

if you have an unique id in the table, then i would go for something like this:

 SELECT A,B,C,D FROM table WHERE id IN (SELECT DISTINCT A,B,D) 

The problem is that you would always get the first value of C, not the frist one with an value.