Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL Query - Need Help

$
0
0

Hi,

I need help with this query.

Data

Parent  Item        Description   Cost

AAA   ITEM-A1     TEST-ITEM-A1  1.00
AAA   TEST-A2  TEST-ITEM-A2  1.25
AAA   TEST-A3  TEST-ITEM-A3  1.30
BBB   TEST-B1  TEST-ITEM-B1  2.00
BBB   TEST-B2  TEST-ITEM-B2  2.25

This is the output I need

Parent  Description   Cost

AAA   TEST-ITEM-A1 1.00
BBB   TEST-ITEM-B1 2.00

Basically I need the parent to be unique and I need to return the description and cost from any other item within the parent.

Any help will be greatly appreciated.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>