User Profile
Collapse
-
thanks deepuv04, it works. I just changed inner join to left join to include people without pts. but thanks a lot once more. -
because table b's primary key is consist of id_a and ib_c
table c:
id_c''''''''''''''' ''''game
1''''''''''''''' ''''''''''''poker
2''''''''''''''' '''''''''''free cell
3''''''''''''''' '''''''''''solitaire
tom played 3 games and he won 13 points (sum of pts in b). highest score he achieved in game number 3 solitaire (he won 7 pts in solitaire). result table looks like this
id_A'...Leave a comment:
-
sql query with sum and max in two tables
table a
id_A''''''''''' ''''''''name
1'''''''''''''' ''''''''''''''t om
2'''''''''''''' ''''''''''''''f rank
3 ''''''''''''''' '''''''''john
table b:
id_A''''''''''''''' ''''''''''''''' '''''id_C'''''''''''points
1''''''''''''''' ''''''''''''''' ''''''''''''''' ''''1''''''''''''''' ''''''1
1''''''''''''''' ''''''''''''''' ''''''''''''''' ''''2''''''''''''''' ''''''5
1''''''''''''''' ''''''''''''''' ''''...
No activity results to display
Show More
Leave a comment: