4
Reply

compare two tables select distinct field

VINAY KUMAR

VINAY KUMAR

Mar 15 2017 7:46 AM
204
i have table like below
table_a 
sno    name    student_id      
1        abcd         1
2       bcad         2
 
 
table_b
 
sno    student_id      amount  
1              1                   600
2               1                  500
3                  2                200
 compare twotables addition amount field and select name field
i want like below format
  Student_id      name    totalamount
        1                abcd       1100
        2                bcad         700
 
 

Answers (4)