The Queries in this page solved at the library database. It is a sample database generated by randomly records. You can download it from the link. You will see more than 500 examples in the future. You can filter from the search panel above by selecting sql statements. I hope you will like it
Solution 1)
Select top 1 * from books
order by sayfaSayisi desc
Solution 2)
Select * from books
where sayafaSayisi=(Select max(sayfaSayisi) from books)
ETİKETLER
Select - Top - Where - Order By - Sub Query - Aggragate -Solution 1)
Select top 1 students.*,takendate
from students,borrows
where students.studentId = borrows.studentId
order by borrows.takenDate desc
Solution 2)
Select top 1 students.*,takendate
from students
join borrows on students.studentId = borrows.studentId
order by borrows.takenDate desc
Solution 3)
Select students.*,takendate
from students
join borrows on students.studentId = borrows.studentId
where takenDate = (Select max(takenDate) from borrows)
ETİKETLER
Select - Top - Join - Where - Order By - Sub Query - Çoklu Tablo -Solution 1)
Select name,surname,count(borrowsno) BookCount
from students
left join borrows on students.studentId = borrows.studentId
group by students.studentId,name,surname
order by BookCount
Solution 2)
Select name, surname,
(Select count(*) from borrows
where students.studentId = borrows.studentId) as BookCount
from students
order by BookCount
ETİKETLER
Select - Top - Where - Having - Sub Query -