Mysql database practical operation

  • Orders table order
    • One-time orders Order Amount Receipt area under order number Customer id
    • id time num price part u_id
    • Inserted data
      • (1,"2019-01-01",1000,10000,"北京",2)
      • (2,"2019-05-01",1000,70000,"北京",1)
      • (3,"2019-04-01",4000,80000,"北京",3)
      • (4,"2019-08-01",6000,10000,"北京",5)
      • (5,"2019-02-01",1000,7000,"上海",4)
  • Customer user list
    • Customer id User Name
    • u_id name
    • Inserted data
    • (1, "Dandan")
    • (2, "as used with")
    • (3, "cool")
    • (4 "circle")
    • (5, "Lily")
  • Commodity goods table
    • Product id Product Name Order Number
    • g_id name id
    • Inserted data
    • (1, "computer", 1)
    • (2, "mobile phone", 3)
    • (3, "desktop", 4)
    • (4, a "smart plate", 5)
    • (5 "remote control", 2)
  • 1, details of the amount of the order of 10,000 or more =
  • 2, the next single commodity details before July 1, 2019 of =
  • 3, the first time under a single customer's name and Receiving area
  • 4, the largest number of orders Commodity Description and Order Time =
  • 5, average order value of more than 8,000 trade names.
  • 6. Receiving area is Beijing's commodity details number in ascending order by display 2 =
  • 7, each receipt area average order value =
  • 8. order value of 5000 or more orders, in descending order by the amount =
  • 9. The statistical average number of orders in all regions =
  • 10. screened order number for the order amount and names of 3

Guess you like

Origin www.cnblogs.com/YiwenGG/p/12174664.html