563 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
This will generate the database that you'll need to use in order to do this exercise (note that the database and script are only to be used for exercises published on this website, and may not be reused or distributed in any form without the prior written permission of Wise Owl).
Create a query which shows two statistics for each category initial:
Here are the first few rows you should get when you run your ever-so-slightly contrived query:
It looks like most events begin with categories beginning with an E (there are 5 such categories, which helps), but that Ns have it for the longest average event name length.
You'll need to use the following functions at some point: CAST or CONVERT, AVG, COUNT, LEN, UPPER and LEFT!
Save this query as P please bob, then close it down.
|When:||14 Nov 23 at 06:44|
select left(categoryname,1) as [Category initial], count(eventid) as [Number of events],
cast(avg(cast(len(eventname) as float)) as decimal(5,2)) as [Average event name length] from tblCategory join tblEvent on
tblCategory.CategoryID = tblEvent.CategoryID group by left(categoryname,1)
|When:||03 Oct 23 at 16:36|
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)
|When:||24 Sep 21 at 15:52|
left (c.CategoryName ,1) as Category_Initial
, count (e.EventName) as Number_of_Events
, sum(len (e.EventName)) as Total_Length
, cast(avg( cast( len (e.EventName) as float ) ) as decimal(6,2) ) as AVG_Event_Name_Length
from [dbo].[tblEvent] e
left join [dbo].[tblCategory] c
on e.CategoryID = c.CategoryID
group by left (c.CategoryName ,1)
25 Aytoun Street