Hello everyone. I have a table. What should be the query(mssql) for this result? table: id name type number 1 abc 1 100 2 abc 0 20 3 abb 1 200 4 abb 0 150 5 acc 1 120 6 abc 1 200 7 abc 0 10 result: name number abc 270 abb 50 acc 120 Here the solution is simple. 1 abc 1 100 2 abc 0 20 6 abc 1 200 7 abc 0 10 // abc 100+200-20-10 3 abb 1 200 4 abb 0 150 // abb 200-150 5 acc 1 120 // acc 120-0 help me to write a query(mssql).
Hi, there would be a lot of queries that can derive those results? Perhaps it's better if you explain what you are trying to achieve and more information about what is happening?