SQL knowledge Beginner
I have a below table: ScoreTable
Name Score Reason Subject
a1 0 NULL NULL
a2 -1 NULL NULL
a3 -3 fail Maths
a4 -3 fail History
a3 0 NULL NULL
I want to write a query which will look some thing like below
Select DISTINCT Name, Result,
(If Result = -3
then Concat(Reason,' ',Subject))As FailedIn)
From ScoreTable
Expected Output:
Name Score FailedIn
a1 0 0
a2 -1 0
a3 -3 fail Maths
a4 -3 fail History