Hi everyone,
I am having some trouble with an SQL statement that I just cant seem
to get to work. I have imported some data into MS Access from another
application and have a single table with information in it.
There are a number of columns, and I am trying to do a 'summary' type
query for a quick view of the information. The problem comes in when I
am trying to place a condition on the select statement. I am trying to
work it as follows:
There are several products advertised each week, and this is
represented by rows with data in the following columns, CW for
Calender week, Retailer for the store that did the advertising, and
Product for the product that was advertised. I also have other columns
such as Price etc....
The result that I am trying to achieve is to have a single query that
lists one row per product that has been advertised in any given week
by at least 7 retailers, the number of times that this has occurred,
and the average price for these occurrences.
So in short it is supposed to look like:
Number_of_Weeks Average_Price
Product1 # EURO
Product2 # EURO
....and so on
I am having a complete mental block with this one, even with several
strong coffees! If anyone can point me in the right direction I would
greatly appreciate it.
Cheers
The Frog
I am having some trouble with an SQL statement that I just cant seem
to get to work. I have imported some data into MS Access from another
application and have a single table with information in it.
There are a number of columns, and I am trying to do a 'summary' type
query for a quick view of the information. The problem comes in when I
am trying to place a condition on the select statement. I am trying to
work it as follows:
There are several products advertised each week, and this is
represented by rows with data in the following columns, CW for
Calender week, Retailer for the store that did the advertising, and
Product for the product that was advertised. I also have other columns
such as Price etc....
The result that I am trying to achieve is to have a single query that
lists one row per product that has been advertised in any given week
by at least 7 retailers, the number of times that this has occurred,
and the average price for these occurrences.
So in short it is supposed to look like:
Number_of_Weeks Average_Price
Product1 # EURO
Product2 # EURO
....and so on
I am having a complete mental block with this one, even with several
strong coffees! If anyone can point me in the right direction I would
greatly appreciate it.
Cheers
The Frog
Comment