From d2d3947054cf480f17233a29c0129dc7787efd86 Mon Sep 17 00:00:00 2001 From: Syeda Farhath fatima <112872466+SyedaFarhath@users.noreply.github.com> Date: Fri, 31 Mar 2023 00:24:42 +0530 Subject: [PATCH] Update Biggest Single number.sql --- Easy/Biggest Single number.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Easy/Biggest Single number.sql b/Easy/Biggest Single number.sql index 98601f7..a6ef4ef 100644 --- a/Easy/Biggest Single number.sql +++ b/Easy/Biggest Single number.sql @@ -29,4 +29,14 @@ from from my_numbers group by num having count(*)=1 -) a \ No newline at end of file +) a + + +------------Alternate solution--------- +select max(num) as num +from( + select num, count(*) + from my_numbers + group by num + having count(*)=1 +) as a;