Grouping summation of mysql concatenated tables

1. Find the score of the grouping in table an and sort it

2.
a Table
id
openid
groups grouping

b Table
id
openid
step score

openid is the associated field of two tables

3. Get the sum of groups grouping corresponding to step scores in table b sorted by groups

Mar.02,2021

solved


SELECT a.groups answer sum (b.step) FROM an INNER JOIN b USING (openid) GROUP BY a.groups ORDER BY a.groups DESC


SELECT a.groups answer sum (b.step) as score FROM a LEFT JOIN b ON a.groups=b.groups GROUP BY a.groups

)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf6f51-32055.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf6f51-32055.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?