Hi,
I am working on a query (given below) where i need to pull data by sector and top # of records from table [APPS UK SALES FLASH MASTER QUERY].[Opty Id]. Also the top # of records will be an input from the user. How do i desigh it?
SELECT [APPS UK SALES FLASH MASTER QUERY].[UK Sector], [APPS UK SALES FLASH MASTER QUERY].[Opty Id], [APPS UK SALES FLASH MASTER QUERY].Account, [APPS UK SALES FLASH MASTER QUERY].Opportunity, [APPS UK SALES FLASH MASTER QUERY].Stg, [APPS UK SALES FLASH MASTER QUERY].[InterCo Tag], [APPS UK SALES FLASH MASTER QUERY].Probability, [APPS UK SALES FLASH MASTER QUERY].[Ctt Sign Date], Sum([APPS UK SALES FLASH MASTER QUERY].[Unweighted Bookings]) AS [SumOfUnweighted Bookings]
FROM [APPS UK SALES FLASH MASTER QUERY]
GROUP BY [APPS UK SALES FLASH MASTER QUERY].[UK Sector], [APPS UK SALES FLASH MASTER QUERY].[Opty Id], [APPS UK SALES FLASH MASTER QUERY].Account, [APPS UK SALES FLASH MASTER QUERY].Opportunity, [APPS UK SALES FLASH MASTER QUERY].Stg, [APPS UK SALES FLASH MASTER QUERY].[InterCo Tag], [APPS UK SALES FLASH MASTER QUERY].Probability, [APPS UK SALES FLASH MASTER QUERY].[Ctt Sign Date]
ORDER BY [APPS UK SALES FLASH MASTER QUERY].[UK Sector], Sum([APPS UK SALES FLASH MASTER QUERY].[Unweighted Bookings]) DESC;
I am working on a query (given below) where i need to pull data by sector and top # of records from table [APPS UK SALES FLASH MASTER QUERY].[Opty Id]. Also the top # of records will be an input from the user. How do i desigh it?
SELECT [APPS UK SALES FLASH MASTER QUERY].[UK Sector], [APPS UK SALES FLASH MASTER QUERY].[Opty Id], [APPS UK SALES FLASH MASTER QUERY].Account, [APPS UK SALES FLASH MASTER QUERY].Opportunity, [APPS UK SALES FLASH MASTER QUERY].Stg, [APPS UK SALES FLASH MASTER QUERY].[InterCo Tag], [APPS UK SALES FLASH MASTER QUERY].Probability, [APPS UK SALES FLASH MASTER QUERY].[Ctt Sign Date], Sum([APPS UK SALES FLASH MASTER QUERY].[Unweighted Bookings]) AS [SumOfUnweighted Bookings]
FROM [APPS UK SALES FLASH MASTER QUERY]
GROUP BY [APPS UK SALES FLASH MASTER QUERY].[UK Sector], [APPS UK SALES FLASH MASTER QUERY].[Opty Id], [APPS UK SALES FLASH MASTER QUERY].Account, [APPS UK SALES FLASH MASTER QUERY].Opportunity, [APPS UK SALES FLASH MASTER QUERY].Stg, [APPS UK SALES FLASH MASTER QUERY].[InterCo Tag], [APPS UK SALES FLASH MASTER QUERY].Probability, [APPS UK SALES FLASH MASTER QUERY].[Ctt Sign Date]
ORDER BY [APPS UK SALES FLASH MASTER QUERY].[UK Sector], Sum([APPS UK SALES FLASH MASTER QUERY].[Unweighted Bookings]) DESC;