I need some help, i have two tables here below "Invoices and Customers". Write sql query to return a list of all invoices. each invoice, show the invoice Id, billing date, the customer name, the name of the customer who refered. Should be order by billing date?
- // Invoices
-
- SELECT TOP (1000) [Id]
- ,[BillingDate]
- ,[CustomerId]
- FROM [eNtsaRegistration].[dbo].[Invoices]
-
- // Customers
- SELECT TOP (1000) [Id]
- ,[Name]
- ,[ReferredBy]
- FROM [eNtsaRegistration].[dbo].[Customers]