Our training courses

Other training resources

Our training venues

Why we are different

Details for Yash2211

Yash2211 has participated in the following threads:

Added by Yash2211 on 03 Oct 2023 at 16:36

select

left(tc.categoryname,1) as [Category intial],
count(te.eventid) as [No of Events],
cast(avg(cast(len(te.eventname) as float)) as decimal(6,2)) as [Average event name length]


from tblevent as te
inner join tblCategory tc on te.CategoryID=tc.CategoryID
group by left(tc.categoryname,1) 

Added by Yash2211 on 03 Oct 2023 at 15:45

select count(eventid) as [No of Event],
Max(eventdate) as [Last date],
Min(eventdate) as [First date] 
from tblevent

Added by Yash2211 on 24 Sep 2023 at 12:15

select EventName, concat(week_name,' ',date_name,' ',month_name,' ',year_no) as 'Full date' from

(select eventname,eventdate,datename(weekday,eventdate) as week_name,datename(year,eventdate) as year_no,datename(month,eventdate)as month_name
,datename(day,eventdate)as date_no,
case
    when datename(day,eventdate) = 1 then '1st'
    when datename(day,eventdate) =2 then '2nd'
    when datename(day,eventdate) = 3 then '3rd'
    when datename(day,eventdate) not in (1,2,3) then CONCAT(cast(datename(day,eventdate) as varchar(10)),'th')
    end as date_name
from tblevent

) as t
order by eventdate

Added by Yash2211 on 20 Sep 2023 at 17:26

select EventName,EventDate, datename(weekday,eventdate) as 'Day of week',datename(day,eventdate) as 'Day number'

from tblEvent
where datename(weekday,eventdate) = 'Friday'
and 
datename(day,eventdate) = '13'

Added by Yash2211 on 20 Sep 2023 at 17:18

select Eventname, eventdate as NotFormated,
format(eventdate,'dd/MM/yyyy') as UsingFormat,
convert(varchar,EventDate, 103)
from tblEvent
where year(eventdate) = '1995'

Added by Yash2211 on 20 Sep 2023 at 17:10

select Eventname, eventdate as NotFormated,
format(eventdate,'dd/MM/yyyy') as UsingFormat,
convert(varchar,EventDate, 103)
from tblEvent

Added by Yash2211 on 17 Sep 2023 at 12:41

select Countryname,
case
when continentid in (1,3) then 'Eurasia'
when continentid in (5,6) then 'Americas'
when continentid in (2,4) then 'somewhere hot'
when continentid in (7) then 'somewhere cold'
else 'somewhere else'
end as 'Countrylocation'
from tblCountry
order by countryLocation desc

Added by Yash2211 on 13 Sep 2023 at 17:46

select *,isnull(summary,'No summary') as 'Using isnull',coalesce(summary,'No summary') as 'Using Coalensce',
case
when summary is null then 'No Summary' else Summary
end  'Using case'


from tblContinent

Added by Yash2211 on 11 Sep 2023 at 18:07

select concat(eventname,' (category ',cast(CategoryID as varchar),')') as  'Event (category)',Eventdate from tblEvent
where countryid = 1

Added by Yash2211 on 11 Sep 2023 at 18:05

select *,concat(eventname,' (category ',cast(CategoryID as varchar),')') as mer from tblEvent
where countryid = 1

Added by Yash2211 on 27 Aug 2023 at 17:53

first I created view for simplicty then use logic,

 

/*Create view table1

as

select EventName,lower(left(eventname,1)) as lefty,lower(right(eventname,1)) as righty from tblEvent*/

 

select * from

 

(select eventname,

Case

 when lefty=righty

 then 'Same letter'

 

        when righty in ('a','e','i','o','u') and lefty in ('a','e','i','o','u')

 then 'Begin and ends with vowel'

 

 end as 'verdict'

from table1) as t

 

where verdict is not null

Added by Yash2211 on 27 Aug 2023 at 16:04

select EventName,LEN(EventName) as length_name from tblEvent

Added by Yash2211 on 26 Aug 2023 at 11:00

select * from tblEvent
where eventname like '%Teletubbies%' or eventname like '%Pandy%'

Added by Yash2211 on 26 Aug 2023 at 10:52

select * from tblEvent
where categoryid in (5,6) and EventDetails not like '%War%' and  EventDetails not like '%Death%'

Head office

Kingsmoor House

Railway Street

GLOSSOP

SK13 2AA

London

Landmark Offices

99 Bishopsgate

LONDON

EC2M 3XD

Manchester

Holiday Inn

25 Aytoun Street

MANCHESTER

M1 3AE

© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.

End of small page here
Please be aware that our website uses cookies!
I'm OK with this Tell me more ...