Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

suggest me a query to produce a result that shows sum of total due amount for each customer

$
0
0

the result is i am getting is 

cuatomer name |  due amount 

---------------------------------------

user 1 |        21

user1 |24

user 1| 26

uerr 223

customer details stored in customer table and due amount is stored in invoice, invoice also stores a foreign key customer no which is primary key in customer 

please use normal sql query(sub queries, views joins, aggregations etc)

the resukt i am looking for 

user1 |71

user 2| 23

thanq


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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