• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Transact SQL Help

Doxml

Junior Member
Hi, I have the following T-SQL problems I need help with.

Problem 1
Given the table Orders with columns OrderID, CustID, OrderDate, and OrderAmount,

Find all customers who have placed a first order between 1/1/2012 and 12/31/2012 and who have a total order of at least $300 since 1/1/2013.

Problem 2
Given the table Orders with columns OrderID, CustID, OrderDate, and OrderAmount,

Determine what percentage of customers placing their first order between 1/1/2012 and 12/31/2012 also placed a second additional order during the same year. Return a table with the count of total first year customers, and the number of those same customers who have ordered more than once in their first year, and the calculated percentage of first year customers who have multiple orders in that year.
 
Back
Top