Could you tell me how to write the SQL of the top 10 users who get the order amount?

have the following two sample tables

order amount is equal to orderinfo price*count in the table, and each order has more than one item.

how can I get the top 10 users with the total amount of orders through the SQL statement?

add: each user may also have multiple orders

Feb.28,2021

< H2 > as shown in figure < / H2 >

order

orderinfo

< H2 > execute SQL: < / H2 >
  

add an extra field in the order table to store the total amount of orders with appropriate redundancy to facilitate query

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-1b35362-2b6f2.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-1b35362-2b6f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?