SQL Query | Custom Sorting | Order by Month in an Year

preview_player
Показать описание
This video discusses how custom sorting can be achieved in a SQL Query.

This makes use of the Case statement in the Order By clause.

Please do not forget to like, subscribe and share.

For enrolling and enquiries, please contact us at
Рекомендации по теме
Комментарии
Автор

I looked everywhere to answer this question--THANK YOU!!

ra
Автор

Mam Your efforts are really appreciated... Thank you so much..

kartik-wijv
Автор

Hi, you can also use following query to sort month names in chronological order -

select MonthName, sales from (select datepart(MM, MonthName + '01 1990') as Month_number, Month_Name,
Sales from dbo.Sales)s order by Month_number;

akankshaagrawal
Автор

keep it up mam best video thank you soo much❤

sushantparekar
Автор

Thanks for useful videos, please publish more & more

optimastic
Автор

Hi sis,

Out put
2021 - Jan
2021- Nov
2020- Feb

rpa
Автор

great, can you put us all the dataset to apply with you

sherifelgazar
Автор

What if I want to view only the data of the month jan.?

dhanushkumar
Автор

What is the query contains data from more than 1 year? How can I sort it?

MrAslev
Автор

How do i calculate the sales for previous year, basically list sales for last 12 months based off a date?

jeannieramirez
Автор

select * from employee
order by
case when Countryname ='India' then 0
else 1 end
, First_Name desc

hello madam, when i am using 0 instead of 1 and (1 instead of null) as you said then only i get india on top :(

Liyaan_World
Автор

Hi, may I know what's the meaning of "sorted alphabetically and reverse chronologically"? I got this question and I have no idea what it means and how to solve it🥲 Many thanks

SLY-gblr
welcome to shbcf.ru