0

I have this table:

Product | Qtdy | Price 
A | NULL | 123.00 
A | 23 | NULL

How Can I represent convert like that?

Product | Qtdy | Price 
A | 23 | 123.00

Which means group by product using Null to return value print in the next line?

Thank you

Colin 't Hart
9,51015 gold badges37 silver badges44 bronze badges
asked May 4, 2019 at 2:03

1 Answer 1

0

Here's one way.

SELECT Product, MAX(Qtdy), MAX(Price)
FROM table
GROUP BY Product

The better answer is to clean up your data so it isn't ditry.

answered May 4, 2019 at 2:27
1
  • Thanks danblack! Works well. Commented May 6, 2019 at 18:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.