Add SQL Query

This commit is contained in:
DeWolFix committed 2026-11-27 09:48:19 +03:00
1 parent 3c89ab5a81
commit 227fa4091f
7 files changed
+253

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
--use Learner_Achivmen;
--SELECT UPPER([Name]), LOWER([Surname]),
--Substring([Phone],7,4)
--FROM [dbo].[Learners]
--SELECT GETDATE()
--SELECT SWITCHOFFSET(GETDATE(),0)
--SELECT Month([Date])
--from [dbo].[Learner_Course]
--SELECT [Courses].[Name], [Hour], [Price],
--[Courses].[Date] FROM [Courses],
--[Learner_Course], [Learners]
--WHERE
--[Learner_Course].LearnerId = [Learners].Id
--and [Learner_Course].CourseId = Courses.Id
--and [Courses].[Name] like '%çàêð%' and
--[Learners].Phone like '%46%'
--SELECT [Courses].[Name], [Hour],
--[Price], [Courses].[Date]
--FROM [Courses]
--WHERE ([Price] Between 0 And 50000) And
--([Price] Not Between 10000 And 15000)
--SELECT [Courses].[Name], [Hour],
--[Price], [Courses].[Date]
--FROM [Courses]
--WHERE [Price] In (9000, 12000)
--ORDER BY [Price] DESC, [Name] ASC
--SELECT Count(*), Surname
--FROM [dbo].[Learners]
--GROUP BY [Surname]
--HAVING Count(*)>1
--ORDER BY Surname ASC
SELECT C.[Name], [Hour], [Price], C.[Date]
FROM [Learner_Course] as LC
Inner Join [Courses] C on LC.CourseId = C.Id
Inner Join [Learners] L on LC.LearnerId = L.Id
WHERE C.[Name] like '%çàêð%'
and L.Phone like '%46%'
-- 1í > 5 : 2í > 5
-- 2.5 > 4
-- 3 > 3