G
Guest
I currently have a database that contains some information such as:
File number, date ordered, date closed, gross income. I have two queries
that I would like to combine, the first is as follows:
SELECT Year([OrderDate]) AS [Year], Month([OrderDate]) AS [Month],
Count(File_Tracking.FileNumber) AS CountofFileNumber
FROM File_Tracking
GROUP BY Year([OrderDate]), Month([OrderDate]);
This query will give me the total number of files ordered for each month.
The next query will give me the total number of files closed in each month:
SELECT Year([ClosingDate]) AS [Year], Month([ClosingDate]) AS [Month],
Count(File_Tracking.FileNumber) AS Files, Sum([Gross]) AS SumofGross
FROM File_Tracking
WHERE ([ClosingDate]) Is Not Null
GROUP BY Year([ClosingDate]), Month([ClosingDate]);
The reason I wanted to combine these queries is that I wanted to get a
percentage of how many files are ordered in each month vs. how many files
actually closed in each month. I am stumped on how to get this done in on
query so any help would be greatly appreciated.
File number, date ordered, date closed, gross income. I have two queries
that I would like to combine, the first is as follows:
SELECT Year([OrderDate]) AS [Year], Month([OrderDate]) AS [Month],
Count(File_Tracking.FileNumber) AS CountofFileNumber
FROM File_Tracking
GROUP BY Year([OrderDate]), Month([OrderDate]);
This query will give me the total number of files ordered for each month.
The next query will give me the total number of files closed in each month:
SELECT Year([ClosingDate]) AS [Year], Month([ClosingDate]) AS [Month],
Count(File_Tracking.FileNumber) AS Files, Sum([Gross]) AS SumofGross
FROM File_Tracking
WHERE ([ClosingDate]) Is Not Null
GROUP BY Year([ClosingDate]), Month([ClosingDate]);
The reason I wanted to combine these queries is that I wanted to get a
percentage of how many files are ordered in each month vs. how many files
actually closed in each month. I am stumped on how to get this done in on
query so any help would be greatly appreciated.