473,668 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query to count # of unique entries with multiple fields

1 New Member
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 2159
puppydogbuddy
1,923 Recognized Expert Top Contributor
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
3247
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 programming in the HotDocs software. I've kind of accomplished my goal in access, but I'm not quite there yet and figure I've really screwed something up. The db consists of 5 tables I believe. T1 is the main contact info, with an autonumber ID...
14
8075
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 think I could have easily done this using joins, but I kept getting "could not delete from specified tables" errors. Some google searching has indicated I need to use a subquery. After many failed attempts with different approaches, I finally...
1
3674
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 0 1 1 0 0
2
2726
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 are 20 possible items to be ordered. i need a query that will return a unique row for every item ordered. if the same customer (record) orders 3 items, i need the query to return 3 rows. Each row will have the same customer info (name, address,...
2
1263
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 certain fields from the table with a count > 1. I can do this with one field however I need to do this with multiple fields. Working 1 Field Query, select field_3 from CUSTOMER where field_3 <> ' ' group by field_3 having count(*) > 1 What...
1
2032
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 Staff_Surname Staff_DOB ABC Ltd Joanne Robinson 08/12/1950 DEF Ltd Kevin Smith 25/04/1963 ABC Ltd Paul Jones ...
4
1417
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
1610
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 multiple entries with the tsms.Name in it. However I will specify the Prov_Group and need to get the count each time the Prov_Group= what i specify for the Assigned_To. So Jack could have multiple entries in opencases daily but I need the number of...
4
3118
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 ABC3 4 ABC4
0
8462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8797
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8583
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7401
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5681
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4380
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.