| Author |
Topic |
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 13:48:46
|
| I challenged the Forum yesterday and had a great response and nowhere is even a harder challenge!I have to figure out the following:A = Customer answered one question with no more than two day between answers. (from the answer of the first question to the answer of the last question)B = BB-BMF1 answercode is not less than 1 twice in the same week, broke up in two weeks (A week is 7 days. Starting with most current working backwards, if there is less than 7 days the first 7 are week 1 and > 7 to 14 is week 2)C = BB-BMF1 with a answercode of 5 is not greater than 25% of all BB-BMF1 and BB-BM1 combined answers.D = BB-BBA0 occurred at least once in two weeksA returns 1= true 0 = falseB returns 1= true 0 = falseC returns 1= true 0 = falseD returns 1= true 0 = falseReturn the following format with one line per Cust ID:CustID,A,B,C,DThis is what I believe the data to look like when returned.158,1,0,0,1Below is the data I have.CustID,Ob_Date,LastName,QuestionRef,AnswerCode158,2/12/2007 17:39,Adams ,BB-BM1 ,1158,2/11/2007 14:59,Adams ,BB-BM1 ,1158,2/10/2007 22:59,Adams ,BB-BM1 ,1158,2/10/2007 14:59,Adams ,BB-BM1 ,1158,2/9/2007 14:59,Adams ,BB-BM1 ,1158,2/9/2007 8:02,Adams ,BB-BM1 ,1158,2/8/2007 14:59,Adams ,BB-BM1 ,1158,2/7/2007 14:59,Adams ,BB-BM1 ,1158,2/7/2007 6:59,Adams ,BB-BM1 ,1158,2/6/2007 14:59,Adams ,BB-BM1 ,0158,2/5/2007 14:59,Adams ,BB-BM1 ,1158,2/5/2007 14:59,Adams ,BB-BM1 ,1158,2/5/2007 14:59,Adams ,BB-BM1 ,1158,2/5/2007 14:59,Adams ,BB-BM1 ,1158,2/5/2007 14:59,Adams ,BB-BM1 ,1158,2/4/2007 6:59,Adams ,BB-BM1 ,1158,2/12/2007 17:39,Adams ,BB-BMF1 ,4158,2/11/2007 14:59,Adams ,BB-BMF1 ,3158,2/10/2007 22:59,Adams ,BB-BMF1 ,5158,2/10/2007 14:59,Adams ,BB-BMF1 ,3158,2/9/2007 14:59,Adams ,BB-BMF1 ,4158,2/9/2007 8:02,Adams ,BB-BMF1 ,2158,2/8/2007 14:59,Adams ,BB-BMF1 ,3158,2/7/2007 14:59,Adams ,BB-BMF1 ,3158,2/7/2007 6:59,Adams ,BB-BMF1 ,3158,2/5/2007 14:59,Adams ,BB-BMF1 ,4158,2/5/2007 14:59,Adams ,BB-BMF1 ,2158,2/5/2007 14:59,Adams ,BB-BMF1 ,4158,2/5/2007 14:59,Adams ,BB-BMF1 ,1158,2/5/2007 14:59,Adams ,BB-BMF1 ,4158,2/4/2007 6:59,Adams ,BB-BMF1 ,1158,2/3/2007 22:59,Adams ,BB-BMF1 ,1158,2/3/2007 6:59,Adams ,BB-BMF1 ,3158,2/2/2007 22:59,Adams ,BB-BMF1 ,3158,2/3/2007 22:59,Adams ,BB-BBA0 ,1158,2/3/2007 22:59,Adams ,BB-BM1 ,1158,2/3/2007 6:59,Adams ,BB-BM1 ,1158,2/2/2007 22:59,Adams ,BB-BM1 ,1158,2/2/2007 22:59,Adams ,BB-BM1 ,0158,2/2/2007 22:59,Adams ,BB-BM1 ,1158,2/2/2007 22:59,Adams ,BB-BM1 ,1158,2/1/2007 22:59,Adams ,BB-BM1 ,1158,2/1/2007 22:59,Adams ,BB-BM1 ,1158,2/2/2007 22:59,Adams ,BB-BMF1 ,4158,2/2/2007 22:59,Adams ,BB-BMF1 ,2158,2/1/2007 22:59,Adams ,BB-BMF1 ,2158,2/1/2007 22:59,Adams ,BB-BMF1 ,2 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-16 : 13:53:10
|
| These are not challenges!You want us to do your work for you, for free? While you can sit back and relax with your Pinã Colada in your cubicle at the callcenter?Have a look at this http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79221Use my technique from there to develop the answer for this "challenge".Peter LarssonHelsingborg, Sweden |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 14:07:45
|
| That was for work...... I won't lie... I was in trouble, because I suck at this stuff and my solution was terrible!!!! |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 14:09:00
|
| I am new to this I will show you what I did and then you can see why I am challenging you... or begging for help..You don't even have to write it... Tell me how to do it. I have read a hundred forum entries and MSDN with no luck! Everything I do sucks on this... I can't figure it outI am desperate and I have spent 12 hours on this and this is the best I could do....This isn't for work.... I am trying to learn and using real life data from my work. I am being thrown into all this and I am clueless!!!!!---------------------CREATE TABLE #H2_Table( rerecnum int NUll, h2a int Null, h2b int Null, h2c int Null, h2d int Null )Select a.re_recnum as re_recnum,CONVERT(varchar(10),a.ob_date,101) as obdate,max(CONVERT(varchar(10),a.ob_date,101)) as dd into #H2Dates_Tablefrom #temp_table a where not exists(Select * from #Temp_table b where CONVERT(varchar(10),b.ob_date,101) = CONVERT(varchar(10),a.ob_date+2,101) and CONVERT(varchar(10),a.ob_date,101) <= (Select Max(CONVERT(varchar(10),ob_date-2,101)) from #Temp_table)) group by re_recnum,CONVERT(varchar(10),ob_date,101)Select CustID as Cust_id,Count(Case when questionref = 'BB-BMF1' then ob_date end) as Totaldays,Count(Case when questionref = 'BB-BMF1' and AnswerCode = 5 then ob_date end) as D,Count(case when questionref = 'BB-BBA0' then ob_date end) as Finto #H2test_tablefrom #temp_tablegroup by CustIDinsert #H2_table Select #h2dates_table.CustID ,(case when count(#h2dates_table.obdate) > 2 then 1 else 0 end) as h2a,(case when sum(case when #Weekone_table.questionref ='BB-BMF1' then 1 else 0 end) < 3 and sum(case when #Weektwo_table.questionref ='BB-BMF1' then 1 else 0 end) < 3 and count(#Weektwo_table.obdate) > '' and count(#Weekone_table.ob_date) > '' then 1 else 0 end) as h2b,(case when sum(#H2test_table.d) > sum(#H2test_table.totaldays)*.25 then 1 else 0 end) as h2c,(case when f > 0 then 1 else 0 end) as h2dfrom #H2test_tableleft join #h2dates_table on #h2dates_table.CustID = #H2test_table.Cust_id left join #Weekone_table on #Weekone_table.CustID = #H2test_table.Cust_idleft join #Weektwo_table on #Weektwo_table.Cust_id = #H2test_table.Cust_idgroup by #h2dates_table.CustID,#H2test_table.D,#H2test_table.Forder by #h2dates_table.CustID----------------Select CustID,Min(ob_date) as mindate,max(ob_date) as maxdate from #Weekone_tablegroup by CustIDselect * from #weekone_tableselect * from #weektwo_tableSelect * from #h2dates_tableorder by CustIDSelect a.CustID as CustID,CONVERT(varchar(10),a.ob_date,101) as obdate,max(CONVERT(varchar(10),a.ob_date,101)) as dd --into #H2Dates_Tablefrom #temp_table a where not exists(Select * from #Temp_table b where CONVERT(varchar(10),b.ob_date,101) = CONVERT(varchar(10),a.ob_date+2,101) and CONVERT(varchar(10),a.ob_date,101) <= @searchdate) group by a.CustID,a.ob_date------------------------------So I am sorry if it comes off as I want you to do my work for me... I am just trying to actually get different opinion on how people would do this differently... Pick what style works best for me and learn from that. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-02-16 : 14:24:43
|
quote: Originally posted by Peso These are not challenges!You want us to do your work for you, for free? While you can sit back and relax with your Pinã Colada in your cubicle at the callcenter?
Have you seen this? http://www.callcentermovie.com/It's great! It's 12 minutes long...morphviper, If you want us to help then you need to start providing your data and table structures in the format where we can just do a copy/paste. For table structures, use CREATE TABLE statements. For sample data, use INSERT INTO statements. We then copy/paste your information into our query windows and can then play with your problem. You can't possibly expect us to do all of that typing ourselves for free. To see an example of one of my threads where I was asking for help, check this out:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=42516Notice how fast I had answers by providing the information in the needed format. Tara Kizer |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 14:36:42
|
| Tara,Thanks... Like I said I am new to this. so your help is appreciated!I hope this is all correct.......CREATE TABLE #My_Table( CustID int NUll, Ob_date smalldatetime Null, LastName Varchar(50) Null, QuestionRef Varchar(10) Null, AnswerCode int Null )INSERT INTO #My_Table Values(158,'2/12/2007 17:39','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/11/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/10/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/10/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/9/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/9/2007 8:02','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/8/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/7/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/7/2007 6:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/6/2007 14:59','Adams','BB-BM1',0)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/4/2007 6:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/12/2007 17:39','Adams','BB-BMF1',4)INSERT INTO #My_Table Values(158,'2/11/2007 14:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/10/2007 22:59','Adams','BB-BMF1',5)INSERT INTO #My_Table Values(158,'2/10/2007 14:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/9/2007 14:59','Adams','BB-BMF1',4)INSERT INTO #My_Table Values(158,'2/9/2007 8:02','Adams','BB-BMF1',2)INSERT INTO #My_Table Values(158,'2/8/2007 14:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/7/2007 14:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/7/2007 6:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BMF1',4)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BMF1',2)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BMF1',4)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BMF1',1)INSERT INTO #My_Table Values(158,'2/5/2007 14:59','Adams','BB-BMF1',4)INSERT INTO #My_Table Values(158,'2/4/2007 6:59','Adams','BB-BMF1',1)INSERT INTO #My_Table Values(158,'2/3/2007 22:59','Adams','BB-BMF1',1)INSERT INTO #My_Table Values(158,'2/3/2007 6:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BMF1',3)INSERT INTO #My_Table Values(158,'2/3/2007 22:59','Adams','BB-BBA0',1)INSERT INTO #My_Table Values(158,'2/3/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/3/2007 6:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BM1',0)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/1/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/1/2007 22:59','Adams','BB-BM1',1)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BMF1',4)INSERT INTO #My_Table Values(158,'2/2/2007 22:59','Adams','BB-BMF1',2)INSERT INTO #My_Table Values(158,'2/1/2007 22:59','Adams','BB-BMF1',2)INSERT INTO #My_Table Values(158,'2/1/2007 22:59','Adams','BB-BMF1',2) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-02-16 : 14:49:17
|
| We also need the exact result set that should be returned by the query that we come up with given your sample data.Tara Kizer |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 14:52:36
|
| The exact results would be CustID,a,b,c,d158,1,0,0,1 |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 14:54:30
|
| Also... When you look at this problem...What is your approach to thinking this through?I went with temp tables, because i am not familiar with Cursors at all. Is there a better way, or would you try to just do it all in a query? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-02-16 : 14:57:52
|
quote: Originally posted by morphviper The exact results would be CustID,a,b,c,d158,1,0,0,1
Out of all of that sample data provided, you only want one row to be returned?Tara Kizer |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-16 : 15:02:18
|
| per CustID..The data only has one id in it... So yes. |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2007-02-16 : 17:11:21
|
morph, this is some very complex business logic. The kind that would take a dba several hours to clarify requirements, code, debug, and test for approval. It also smells like the sort of business requirement that can and probably will get changed or tweaked on a regular basis by managers.The key to dealing with a task like this is to BREAK IT DOWN.Do one component at a time, rather than trying to code for all four requirements at once. Not only does this make the task less daunting, but it will allow you to change individual components next month when Mr. VIP requests a "minor modification".So, to your first requirement:quote: A = Customer answered one question with no more than two day between answers. (from the answer of the first question to the answer of the last question)
Well, that just don't make sense. How can someone with only one answer have two days between answers?Here is a coding rule of thumb: if you can't write it in [your native languag], you can't code it in SQL.STAR SCHEMAS ARE NOT DATA WAREHOUSES! |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-02-16 : 17:56:40
|
tara... this is the funniest thing i saw in a while.thanx. laughed my ass off!!!  Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-17 : 02:17:37
|
| Blindman, according to the link I provided earlier to previous post, a customer can answer any question several times with both yes and no.I have a working query now.Peter LarssonHelsingborg, Sweden |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-17 : 03:53:44
|
Morphviper, don't you dare call next problem a "challenge"!Write what it is, "I desperately need help with this query" or any other headline that accurately describes your situation!-- Initialize the starting date to check fromDECLARE @QuestionDate DATETIMESELECT @QuestionDate = '20070213'-- Stage the dataDECLARE @Stage TABLE ( CustID INT, QuestionRef VARCHAR(10), Wk2_0 INT, Wk2_14 INT, Wk2_5 INT, Wk1_0 INT, Wk1_14 INT, Wk1_5 INT, DaysApart INT, PartAnswers INT )INSERT @Stage ( CustID, QuestionRef, Wk2_0, Wk2_14, Wk2_5, Wk1_0, Wk1_14, Wk1_5 )SELECT q.CustID, q.QuestionRef, SUM(CASE WHEN d.wk = 'wk2' AND d.theDate = q.theDate THEN q.Answer0 ELSE 0 END), SUM(CASE WHEN d.wk = 'wk2' AND d.theDate = q.theDate THEN q.Answer14 ELSE 0 END), SUM(CASE WHEN d.wk = 'wk2' AND d.theDate = q.theDate THEN q.Answer5 ELSE 0 END), SUM(CASE WHEN d.wk = 'wk1' AND d.theDate = q.theDate THEN q.Answer0 ELSE 0 END), SUM(CASE WHEN d.wk = 'wk1' AND d.theDate = q.theDate THEN q.Answer14 ELSE 0 END), SUM(CASE WHEN d.wk = 'wk1' AND d.theDate = q.theDate THEN q.Answer5 ELSE 0 END)FROM ( SELECT CustID, DATEADD(day, DATEDIFF(day, 0, Ob_date), 0) AS theDate, QuestionRef, MAX(CASE WHEN AnswerCode = 0 THEN 1 ELSE 0 END) AS Answer0, MAX(CASE WHEN AnswerCode BETWEEN 1 AND 4 THEN 1 ELSE 0 END) AS Answer14, MAX(CASE WHEN AnswerCode = 5 THEN 1 ELSE 0 END) AS Answer5 FROM #MyTable GROUP BY CustID, DATEADD(day, DATEDIFF(day, 0, Ob_date), 0), QuestionRef ) AS qCROSS JOIN ( SELECT 'wk1' AS wk, DATEADD(day, DATEDIFF(day, 0, @QuestionDate), 0) AS theDate UNION ALL SELECT 'wk1', DATEADD(day, DATEDIFF(day, 1, @QuestionDate), 0) UNION ALL SELECT 'wk1', DATEADD(day, DATEDIFF(day, 2, @QuestionDate), 0) UNION ALL SELECT 'wk1', DATEADD(day, DATEDIFF(day, 3, @QuestionDate), 0) UNION ALL SELECT 'wk1', DATEADD(day, DATEDIFF(day, 4, @QuestionDate), 0) UNION ALL SELECT 'wk1', DATEADD(day, DATEDIFF(day, 5, @QuestionDate), 0) UNION ALL SELECT 'wk1', DATEADD(day, DATEDIFF(day, 6, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 7, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 8, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 9, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 10, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 11, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 12, @QuestionDate), 0) UNION ALL SELECT 'wk2', DATEADD(day, DATEDIFF(day, 13, @QuestionDate), 0) ) AS dGROUP BY q.CustID, q.QuestionRef-- Update some vital intermediate statisticsUPDATE sSET s.DaysApart = q.DaysApartFROM @Stage AS sINNER JOIN ( SELECT CustID, QuestionRef, DATEDIFF(day, MIN(Ob_Date), MAX(Ob_Date)) AS DaysApart FROM #MyTable GROUP BY CustID, QuestionRef ) AS q ON q.CustID = s.CustID AND q.QuestionRef = s.QuestionRefUPDATE sSET s.PartAnswers = q.PartAnswersFROM @Stage AS sINNER JOIN ( SELECT CustID, SUM(Wk2_0 + Wk2_14 + Wk2_5 + Wk1_0 + Wk2_14 + Wk2_5) AS PartAnswers FROM @Stage WHERE QuestionRef <> 'bb-bmf1' GROUP BY CustID ) AS q ON q.CustID = s.CustIDWHERE s.QuestionRef = 'bb-bmf1'-- Show the result this waySELECT CustID, QuestionRef, CASE WHEN DaysApart <= 2 THEN 1 ELSE 0 END AS A, CASE WHEN QuestionRef = 'bb-bmf1' AND Wk2_14 + Wk2_5 >= 2 AND Wk1_14 + Wk2_5 >= 2 THEN 1 ELSE 0 END AS B, CASE WHEN QuestionRef = 'bb-bmf1' AND Wk2_5 + Wk1_5 <= 0.25 * PartAnswers THEN 1 ELSE 0 END AS C, CASE WHEN QuestionRef = 'bb-bba0' AND Wk2_14 + Wk2_5 + Wk1_14 + Wk1_5 >= 1 THEN 1 ELSE 0 END AS DFROM @StageORDER BY CustID, QuestionRef-- Show the result that waySELECT CustID, MAX(CASE WHEN DaysApart <= 2 THEN 1 ELSE 0 END) AS A, MAX(CASE WHEN QuestionRef = 'bb-bmf1' AND Wk2_14 + Wk2_5 >= 2 AND Wk1_14 + Wk2_5 >= 2 THEN 1 ELSE 0 END) AS B, MAX(CASE WHEN QuestionRef = 'bb-bmf1' AND Wk2_5 + Wk1_5 <= 0.25 * PartAnswers THEN 1 ELSE 0 END) AS C, MAX(CASE WHEN QuestionRef = 'bb-bba0' AND Wk2_14 + Wk2_5 + Wk1_14 + Wk1_5 >= 1 THEN 1 ELSE 0 END) AS DFROM @StageGROUP BY CustIDORDER BY CustID With this help, and with the help you got here [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79221[/url], you now should be able to write solutions for your problems in the future.If not, maybe you should consider a career change. If you suck at your job (as you yourself wrote), why stick with the job?quote: Originally posted by morphviper I won't lie... I was in trouble, because I suck at this stuff
Peter LarssonHelsingborg, Sweden |
 |
|
|
morphviper
Yak Posting Veteran
60 Posts |
Posted - 2007-02-17 : 17:23:23
|
| I do suck and I would love a career change, but in a small company where you wear 20 different hats and you have people leaveand you get stuck doing someone elses job it makes things hard for a while.I am actually an EDI specialist and this isn't my normal duties!I know you put a ton of time and effort into this and I appreciate it. If you have the time or eneregy, can you explain what logic you put forth to do what you did above.Tara, said to break it down.. Is that how you started this? I have done programming, but SQL seems very different compared to VB.net and so forth. I have purchase several books and stuff, but this hard logic I am not used to. I could have done all this in VB, but not sql.and I can't use VB on this...Well thank you for your assistance and helping me learn some more SQL. |
 |
|
|
|
|
|