Big hello to you all! I have a scenario and I have to make a query for it. So far I have SELECT * FROM service, customer WHERE service.serviceid IN (SELECT customer2service.serviceid FROM customer2service)
This shows all of the customers regardless of if they ordered a service or not. The services shown just display the serviceid 1 and the data for that one service. What it should show is this random data INSERT INTO CUSTOMER2SERVICE VALUES (1, 1, 1);INSERT INTO CUSTOMER2SERVICE VALUES (2, 2, 1);INSERT INTO CUSTOMER2SERVICE VALUES (3, 2, 1);INSERT INTO CUSTOMER2SERVICE VALUES (4, 4, 3);INSERT INTO CUSTOMER2SERVICE VALUES (5, 5, 3);INSERT INTO CUSTOMER2SERVICE VALUES (6, 5, 4);INSERT INTO CUSTOMER2SERVICE VALUES (7, 5, 4);INSERT INTO CUSTOMER2SERVICE VALUES (8, 8, 9);INSERT INTO CUSTOMER2SERVICE VALUES (9, 9, 9);INSERT INTO CUSTOMER2SERVICE VALUES (10, 9, 9);
The scenarioCreate a query to show the service#, description and customer details of all the services purchased from each branch. Group your output by centre and order your output by revenue generated – highest first!I don't necessarily need a direct answer, just a poke in the right direction if you would :)If you need any more data please ask. cheers