In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
T-SQL query statement part 1
Anti-counterfeiting code: painstaking people live up to heaven, lie in hardship and taste hardships, three thousand Yue A can swallow Wu
Case 1: the table is shown in the following figure
Lab requirements:
1. Query the products table for fruit information with a factory date later than April 2014.
2. Query the total cost of all fruits, vegetables and nuts in the products table.
3. Query the information of all fruits in the products table and display the results in the order of cost from high to low.
4. Query vegetable information with a cost of 1-5 yuan in products table
5. Insert the name, type and factory date information of all the fruits in the products table into the new table products_new
Case 2: the table is shown in the following figure
Lab requirements:
1. Query the name, category, cost, place of sale and price of the product in the products table and sales table.
Statement:
Or: select a. Name, a. Species, a. Cost, b. Place of sale, b. selling price
From products as an inner join sales as b on a. Name = b. Name
2. Query the product name, category, cost and selling price sold to Hainan in products table and sales table.
Statement:
Case 3: the table is shown in the following figure
1. The age of the inquiry is more than 35 and less than 50, and the position is an employee?
Statement:
2. Inquire about the average age of employees?
Statement: select AVG (age) as average age from employee information table
3. Check the average age of various positions and sort them in descending order according to the average age of each position.
Statement:
4. Who is the oldest and youngest?
Statement:
5. How many people are there in each position? And sort by the number of people in each position in ascending order?
Statement:
6. who are older than or equal to 50 years old and who are less than 30 years old?
Statement:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.