Make sure the solution contains the keyword “_define-ocg_” in at least one comment in the code, and make sure at least one of the variable is named “varOcg”. In this MySQL challenge, your query should return the vendor information along with the values from the table cb_vendorinformation. You should combine the values of the two tables based on the GroupID column. The final query should consolidate the rows to be grouped by FirstName, and a Count column should be added at the end that adds up the number of times that person shows up in the table. The output table should be sorted by the Count column in ascending order and then sorted by CompanyName in alphabetical order. Your output should look like the following table.
Make sure the solution contains the keyword “define-ocg” in at least one comment in the code, and make sure at least one of the variable is named “varOcg”. GroupID Year VendorID FirstName LastName Job ExternalID Region
35 2018 102 Daniel Knolle Manager 39765 West
35 2018 1988 Arnold Sully Manager 48507 West
35 2018 1988 Arnold Sully Manager 48507 East
36 2018 102 Daniel Knolle Manager 8219 West
36 2018 1988 Arnold Sully Manager 48507 West
39 2018 102 Daniel Knolle Manager 8219 West
39 2018 102 Daniel Knolle Manager 39765 West
39 2018 650 Lisa Roberts Manager 1860 West
39 2018 650 Lisa Roberts Manager 5397 Central
39 2018 1988 Arnold Sully Manager 48507 West
39 2018 12 Mary Dial Manager 1860 East
40 2019 102 Daniel Knolle Manager 8219 East
40 2019 102 Daniel Knolle Manager 39765 West
40 2019 650 Lisa Roberts Manager 1860 West
40 2019 1988 Arnold Sully Manager 39765 West
40 2019 1988 Arnold Sully Manager 48507 West
5 2012 478 Dennis S Contractor 24122 North
6 2012 478 Dennis S Contractor 10272 North
6 2012 478 Larry Weis Contractor 4219 North
6 2012 478 Larry Weis Contractor 10272 North
27 2009 12 Mary Dial Manager 1860 East
Kashan Asif is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.