Viewing 3 posts - 1 through 3 (of 3 total)
SELECT * FROM Formum_Child a INNER JOIN
(SELECT pid, MAX(DateSubmitted) DateSubmitted FROM Forum_Child GROUP BY pid) b
ON a.pid=b.pid AND a.DateSubmitted=b.DateSubmitted
September 19, 2006 at 5:23 am
SELECT Customer, SUM(InvoiceAmt) TotalSales, COUNT(Invoice) NoOfInvoices, Month, SUM(CreditNoteAmt) TotalCreditNote,
COUNT(CreditNote) NoOfCreditNotes
FROM
(SELECT NBillingF.Customer,
CASE WHEN NBillingF.InvoicedValue > 0 THEN NBillingF.InvoicedValue ELSE 0 END AS InvoiceAmt,
CASE WHEN NBillingF.InvoicedValue > 0...
September 14, 2006 at 7:00 am
select d.DepartmentName, e.*
from Department d
join Employee e on e.DepartmentId = d.DepartmentId
March 8, 2006 at 12:33 am
Viewing 3 posts - 1 through 3 (of 3 total)