I am in school to become a software engineer, and I am taking my first class on SQL. We usually use MsSQL, but the schools VMWare instance is down, so I have an older version of Oracle on my computer (Oracle 11g Express). I am trying to take my customer table, and orderInfo table to get the count of each customers # of orders. I have it working if I use the orderTable, but then it would not get customers that have 0 orders. Basically, if the customer is not in the orderInfo table, they won't have an order count. Please See the table structure below and my SQL code.
This is my current SQL code and the output.
SELECT CUSTOMER_ID, COUNT(ORDERINFO.ORDER_ID) AS TotalOrders FROM ORDERINFO WHERE CUSTOMER_ID = CUSTOMER_ID GROUP BY CUSTOMER_ID;
Thank you so much for the help in advance!