About SQLite Jobs

Source: Internet
Author: User
Tags sqlite

--Query the sname, Ssex, and class columns of all records in the student table.
SELECT Sname,ssex,class from Student

--Query The teacher all the units that are not duplicated depart column.
SELECT DISTINCT depart from Teachear

--Query all records of the student table.
SELECT * from Student

--Query all records in the score table for scores from 60 to 80.
SELECT * from score where degree between and 80

-Check the records in the score table for grades 85, 86 or 88.
SELECT * FROM score WHERE degree in (' 85 ', ' 86 ', ' 88 ')

--Check the student table for "95031" class or sex for "female" student records.
SELECT * from Student WHERE ssex= ' woman ' and class= ' 95031 '

--Query all records of the student table in descending order of class.
SELECT * from Student ORDER by class DESC

--Query all records of the score table in CNO Ascending, degree descending order.
SELECT *from score ORDER by degree desc,cno ASC

--Check the number of students in "95031" class.
SELECT Count (*) from Student WHERE class= ' 95031 '

-Check the student number and course number of the highest score in the score table
--select A.sno,b.sname,a.cno,a.degree from score a,student b,course c WHERE a.sno = B.sno and A.cno=c.cno and a.Cno= ' 3-245 ‘
SELECT * FROM score ORDER BY degree desc--Answer

--Check the average score for each course.
SELECT Cno,avg (degree) from score GROUP by CNO

--Check the average score of the course with at least 5 students enrolled in the score table and start with 3.
Select AVG (degree) from score WHERE cno in (SELECT CNO from score GROUP by CNO have count (*) >5) and cno like ' 3% ' GRO Up by Cno

--SNO Columns with a query score greater than 70 and less than 90.
--select * FROM score WHERE degree between and 90
SELECT Sno from score WHERE degree between and 90--Answers

About SQLite Jobs

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.