473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Query to count # of unique entries with multiple fields

I have a database that i've been entering and I need to show how many unique entries I have entered prividing the date range.

The database includes date, productID, locationID, quantity etc.

What I'm trying to find out is the numbers of lines that is Unique date AND locationID. LocationID's are 4 digits with alphabets/number mixed.

I've looked around and only found query unique entries for 1 select field.

I have Access 2007 at work but I'm trying things out with Access that's included in Office XP.

Any helpful input would be appreciated.
Sep 9 '08 #1
1 2145
puppydogbuddy
1,923 Expert 1GB
I have a database that i've been entering and I need to show how many unique entries I have entered prividing the date range.

The database includes date, productID, locationID, quantity etc.

What I'm trying to find out is the numbers of lines that is Unique date AND locationID. LocationID's are 4 digits with alphabets/number mixed.

I've looked around and only found query unique entries for 1 select field.

I have Access 2007 at work but I'm trying things out with Access that's included in Office XP.

Any helpful input would be appreciated.
hi,

try

Expand|Select|Wrap|Line Numbers
  1. SELECT [date], locationID, productID, quantity, Count(UniqueEntry)
  2. FROM  (SELECT DISTINCT [date], locationID, ([date] & [locationID]) As
  3.                           UniqueEntry FROM YourTable)
  4. GROUP BY [date], locationID, productID 
  5. ORDER BY [date], locationID, productID
  6.  
Sep 9 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Robert | last post by:
I am trying to create a db for service providers by county. I'm relatively new to db programming, but I have done quite a bit of programming ranging from the old basic days up to doing some...
14
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I...
1
by: sunilkeswani | last post by:
Hi I am still new to access. I want to know how i can build a query which can display results from 4 different columns/fields Like. Field1 Field2 Field3 Field4 1 2 1 ...
2
by: jennk | last post by:
i am working in Access 97, our database tables are linked from ODBCsqlsvr (not even sure what that means). i have a table where each record has a unique customer and their order information. there...
2
by: horsecock | last post by:
Hi, Being new to DB2 I'm having a small problem that I'm sure is quite easy to someone smarter than me. I have a table with duplicate entries and I need to know how to code a query to exctract...
1
by: gazsharpe101 | last post by:
Hi, I have a problem which should have a relatively simple solution, I just cannot find it. I have a select query which gives me the following results: Company_Name Staff_FirstName ...
4
by: LaSalamandra | last post by:
Let us suppose we have this table ID - CITIES 1 New York 2 New York 3 Los Angeles 4 Los Angeles 5 Los Angeles 6 Atlanta 7 Atlanta
3
by: arggg | last post by:
I have 3 tables I need to get data from. Which as fields I need from each. opencases_daily - Assigned_To, Prov_Group tsms - Group, Name prov_groups - gid, group_name The opencases_daily has...
4
by: jameswilkinsonfjs | last post by:
Hi All, Ok I have a table - it lists items with a unique reference code; lets say there are 4 items : Item RefCode 1 ABC1 2 ABC2 3 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.