当前位置:网站首页>Database answers build standard, answer as required

Database answers build standard, answer as required

2022-06-24 04:24:00 CSDN Q & A

The table structure in the deli fresh food supermarket system is as follows :
Commodity list ( Product id , Name of commodity , Category , quality guarantee period ( God ), supplier );
Sales list ( Product id , Time , Customer number , The unit price , Number );
1. establish “ goods ” and “ sales ” These two basic tables , According to the actual situation , Design the data type of each field , The underscore in the structure identifies the primary key , Wavy lines identify foreign keys , And it is required that the product list “ Name of commodity ” The value is unique ,“ supplier ” Can't be empty ,“ quality guarantee period ” The default value is “30”; In the sales table “ The unit price ” stay 0 To 50000 Between .
2. Number the item as “056B5” The shelf life of the product is increased 10
God ;
3. Query the number of different items in the sales table ;
4. The query product name contains “ Crunchy Wafer ” Or the penultimate word is “ shark ” The commodity number of the word 、 Trade name and supplier .
5. Query category is “ Stationery ” And the unit price is 16 Commodity no. of more than RMB 、 Commodity name and unit price , It is required to arrange in descending order of unit price .
6. Create view view_sale, It is required to display the item number of each item sold 、 Average unit price and total quantity .

原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206170933581560.html