f



1/4 to 4/4

TblCustomer
CustomerID
CustomerName

TblOrder
OrderID
CustomerID
OrderDate

From the above tables, how do I write a query that returns the following for
each customer:

CustomerA Order 1/4
CustomerA Order 2/4
CustomerA Order 3/4
CustomerA Order 4/4

Where CustomerA is the customer name, Order is text, CustomerA placed 4
orders and the orders are sequenced by OrderDate in chronological order.

Thanks!

Carl


0
2/18/2005 1:54:16 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

1 Replies
1853 Views

Similar Articles

[PageSpeed] 34

Carl, you could use a pair of subqueries to count how many orders there are 
in total for the customer, and which one this is.

You would type something like this into the Field row in query design:
    OrderNum: (SELECT Count(OrderID) FROM tblOrder AS Dupe
    WHERE ((Dupe.CustomerID = tblOrder.CustomerID)
    AND (Dupe.OrderDate <= tblOrder.OrderDate)))

Then in the next field in query design:
    OrderCount: (SELECT Count(OrderID) FROM tblOrder AS Dupe
    WHERE (Dupe.CustomerID = tblOrder.CustomerID))

If the customer placed 2 orders on the one date (i.e. tied values), the 
results will be duplicates.

If subqueries are new, see:
    http://support.microsoft.com/?id=209066

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Carl" <csmith@nospamhere.net> wrote in message
news:csmRd.101$x53.20@newsread3.news.atl.earthlink.net...
> TblCustomer
> CustomerID
> CustomerName
>
> TblOrder
> OrderID
> CustomerID
> OrderDate
>
> From the above tables, how do I write a query that returns the following 
> for
> each customer:
>
> CustomerA Order 1/4
> CustomerA Order 2/4
> CustomerA Order 3/4
> CustomerA Order 4/4
>
> Where CustomerA is the customer name, Order is text, CustomerA placed 4
> orders and the orders are sequenced by OrderDate in chronological order.
>
> Thanks!
>
> Carl 


0
AllenBrowne (3681)
2/18/2005 2:21:40 PM
Reply:

Similar Artilces:

KitKat 4.4.4
All about the latest Android update http://www.gottabemobile.com/2014/06/20/android-4-4-4-kitkat-update-breakdown/ Larry wrote, on Wed, 25 Jun 2014 04:56:04 +1000: > All about the latest Android update > http://www.gottabemobile.com/2014/06/20/android-4-4-4-kitkat-update-breakdown/ I've had it on my Moto G for a while now, and, well, the only obvious things are the message app is very oddly different and there is a new emergency contact alarm system that drove me crazy with messages when I tested it out, but, I guess, it will work in dire emergencies. ...

Looking For SunOS 4.1.3 Or 4.1.4
Gentlemen: I am looking to buy a license of SunOS 4.1.3 Or 4.1.4. for a software backward compatibility testing project. I have talked to Sun sales and they no longer offer the product. Dose anyone have an old one they would like to sell? I will also cover all shipping and packaging costs to the San Jose, CA area. Thanks for the help. Thomas Dineen (408) 956-0539 (O) (408) 838-3376 (C) tdineen@ix.netcom.com Thomas Dineen wrote: > Gentlemen: > > I am looking to buy a license > of SunOS 4.1.3 Or 4.1.4. for a > software backward compatibility > testing pro...

Can't synch T|E after 4.1.4 to 4.1.4 upgrade
I upgraded my Palm Desktop for T|E w/ OS 5.2.1 and now can't sync as I could before, using USB. All settings seem ok. Win 2K tries to Install a new device on hotsyn, and ignoring, then searching, hasn't helped. palmOne suggested finding and installing one of these files: VisorUsb.inf OR PalmUSB.sys I can find neither file on my system, and they're not offered as a d/load anywhere. Also tried reinstalling, repair then fresh, no help. I did the "upgrade" because: Palm advises even updating an older 4.1.4 version to the newer 4.1.4, for updated Window Outloo...

4.4 to 5.4 or 6.1
I have a client running release 4.5 on a small Model 250. Their network people want to move them onto Windows Server 2008, which I understand requires release 5.4 or 6.1 They run in the System/36 environment and all their software is home brewed, so all source is available. 1) What box would anyone suggest? 2) What problems are likely? Many thanks Peter Kinsman Peter Kinsman wrote: > I have a client running release 4.5 on a small Model 250. > Their network people want to move them onto Windows Server 2008, which I > understand requires release 5.4 or 6.1 They run in the Syst...

Does 4/2/2= (4/2)/2 =1 OR = 4/(2/2)=4
I don't have matlab and I am trying to translate some simple matlab code. Does 4/2/2 = (4/2)/2 = 1 or 4/2/2 = 4/(2/2) = 4 On 9/11/2012 9:43 AM, sarah.englander@gmail.com wrote: > I don't have matlab and I am trying to translate some simple matlab code. > > Does 4/2/2 = (4/2)/2 = 1 yes. At a given precedence level (and obviously two of the same operators are the same level) evaluation proceeds from LtoR. ....snip... <http://www.mathworks.com/help/techdoc/matlab_prog/f0-40063.html#f0-38155> -- dpb <none@non.net> wrote in message <k2njh1$jes$1@speranza.aioe.org>... > On 9/11/2012 9:43 AM, sarah.englander@gmail.com wrote: > > I don't have matlab and I am trying to translate some simple matlab code. > > > > Does 4/2/2 = (4/2)/2 = 1 > > yes. At a given precedence level (and obviously two of the same > operators are the same level) evaluation proceeds from LtoR. > > ...snip... > > <http://www.mathworks.com/help/techdoc/matlab_prog/f0-40063.html#f0-38155> > > -- There are a few thing you need to understand: 1. You need to get matlab in order to translate the simple code 2. You should define your parameters as in what is the expected output of your search based on the equations used: Is it : a) 4/2/2 b) (4/2/2) On 9/11/2012 11:13 PM, Salvinder wrote: .. > There are a few thing you need to understand: > 1. ...

Upgrade HACMP from 4.4.1 to 4.5
I'm planning on an HA upgrade from 4.4.1 to 4.5. In the Installation and Admin Guide it says that 4.5 must be installed on all nodes. Then on page 306 in the cl_convert section it talks about a conversion. If I have to install 4.5 on all nodes why do I need to also run the cl_convert and clconvert_snapshot commands? TIA tstclaire@hotmail.com (St. Claire) wrote in message news:<8581fcb0.0309240725.103e6b27@posting.google.com>... > I'm planning on an HA upgrade from 4.4.1 to 4.5. In the Installation > and Admin Guide it says that 4.5 must be installed on all nodes. The...

Leo 4.4.1 beta 4 released
Leo 4.4.1 beta 4 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.1: ---------------------------- - Leo outputs decorators correctly, provided that the decorator is not a Leo directive. - A new colorizer plugin controlled by jEdit language description files. - A new shadow files plugin that allows derived files not to have sentinel lines. - Multiple editors in Leo's body pane. - Search ...

Leo 4.4.4 beta 1 released
Leo 4.4.4 beta is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.4: ---------------------------- - A threading_colorizer plugin replaces the __jEdit_colorizer__ plugin. This plugin features much better performance. - Support for @auto nodes. Such nodes allow people to collaborate using Leo without inserting Leo sentinels in the files Leo generates. Links: ------ Leo: http://webpages.charte...

Using Palm 4.1.4 data with Clie 4.0.1?
I have been using a Palm 3x with 4.1.4 desktop. I found a Sony S300 at a garage sale and it is much nicer, so I would like to change. But I can't get the Palm data to work with the Sony. If I export the Palm data and import it to the Sony, the Sony desktop says it has imported the datebook entries, but then the calender does not show them. The address book is worse; there is says the file is corrupted. I also tried just moving the files over, but the Sony desktop can't read the Palm files. There must be a way to do that. Thanks. ...

[ace-bugs] Error during compilation ACE-5.4.4 + TAO-1.4.4
--001485f99caa0c8d8c0475c7d5ee Content-Type: text/plain; charset=UTF-8 Hello,I'm trying to compile ACE-5.4.4+TAO-1.4.4 and I got an error while I trying to compile it: /home/mchacon/nextgen/extra/ACE_wrappers/ace/os_include/os_stropts.h:64:28: error: stropts.h: No such file or directory I use Fedora 11 with gcc 4.4.1 and I was searching in google and I found that there are some is issue about strems buffer in Linux, please take a look these links: http://www.archivum.info/comp.soft-sys.ace/2008-04/00069/Re:_[tao-users]_PRF:_Autobuild_on_Fedora_Rawhide_(GCC_4.3.0)_is_a_no-go https://bugzilla.redhat.com/show_bug.cgi?id=439403 Is there any workaround to fix it? I have the header in Fedora Core 3, but I trying to make it work in Fedora 11, Is it possible? Thanks and Regards! Salu2... masch... --001485f99caa0c8d8c0475c7d5ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello,<div>I&#39;m trying to compile ACE-5.4.4+TAO-1.4.4 and I got an error= while I trying to compile it:</div><div><br></div><div>/home/mchacon/nextg= en/extra/ACE_wrappers/ace/os_include/os_stropts.h:64:28: error: stropts.h: = No such file or directory</div> <div><br></div><div>I use Fedora 11 with gcc 4.4.1 and=C2=A0I was searching= in google and I found that there are some is issue about strems buffer in = Linux, please take a look these links:</div&g...

& # 4 0 ; & # 4 4 3 0 5 ; & # 4 4 2 5 6 ; & # 4 1 ;��������� ARS���� �����ؿ�(����)
<HTML> <HEAD> <META content="text/html; charset=ks_c_5601-1987" http-equiv=Content-Type> <STYLE> p, font, span { line-height:120%; margin-top:0; margin-bottom:0; }</STYLE> </HEAD><BODY> <TABLE borderColor=#cccccc width=629 borderColorLight=#cccccc border=1> <TBODY> <TR> <TD width=619 height=67> <P align=center><FONT face=����><SPAN style="FONT-SIZE: 11pt"><IMG src="http://www.ezbizi.com/ezbizi/home_img/daechul_01.gif"></SPAN></FONT></P>&l...

& # 4 0 ; & # 4 4 3 0 5 ; & # 4 4 2 5 6 ; & # 4 1 ;@��������� ARS���� �����ؿ�@(����)
<HTML> <HEAD> <META content="text/html; charset=ks_c_5601-1987" http-equiv=Content-Type> <STYLE> p, font, span { line-height:120%; margin-top:0; margin-bottom:0; }</STYLE> </HEAD><BODY> <table border="1" width="629" bordercolor="#cccccc" bordercolorlight="#cccccc"> <tr> <td width="619" height="67"> <p align="center"><font face="����"><span style="FONT-SIZE: 11pt"></span></font></p...

ANN: Leo 4.4.4 beta 4 released
Leo 4.4.4 beta 4 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 This beta 4 version fixes all bugs reported against Leo 4.4.4 beta 3. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html Leo 4.4.4 contains many important features originally planned for later releases. The highlights of Leo 4.4.4: ---------------------------- - The Great Graph Aha (tm): simple scripts allow Leo outlines to represent arbitrary directed graphs. There is no need for a separate 'graph ...

ANN: Leo 4.4.4 beta 4 released
Leo 4.4.4 beta 4 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 This beta 4 version fixes all bugs reported against Leo 4.4.4 beta 3. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html Leo 4.4.4 contains many important features originally planned for later releases. The highlights of Leo 4.4.4: ---------------------------- - The Great Graph Aha (tm): simple scripts allow Leo outlines to represent arbitrary directed graphs. There is no need for a separate 'graph world'. The graphed.py plugin is a direct result of this Aha. The graphed.py plugin allows you to create general graphs from Leo outlines. - @menus trees in settings files create all of Leo's menus. It is now dead easy to make Leo's menus look the way you want. - @buttons trees in settings files create common @button nodes created in all Leo outlines. - @auto nodes eliminate sentinels in derived files, thereby allowing people to collaborate using Leo more easily. - New commands for resolving cvs conflicts. - A threading_colorizer plugin replaces the __jEdit_colorizer__ plugin. This plugin features much better performance and a new, elegant algorithm. - Leo is now compatible with jython. - Better support for icons in headlines. - The usual assortment of bug fixes and other minor improvements. Links: ------ ...

SEO SpyGlass 4.4.4
A rock-solid way to live your on-line competition behind: get your hands on this handy and functionally-rich SEO software for competition research and analysis. SEO SpyGlass spares you countless hours of trial-and-error work, unearthing all SEO-effective methods that have helped your competitors hit top search engine positions. At supersonic speed this must-have SEO tool uncovers up to 50,000 backlinks a website has. After that you are let loose to check all these links back and forward, analyzing and comparing them according to all important SEO factors. With SEO SpyGlass you discov...

Screensaver Wonder 4 4.4
With Screensaver Wonder you can easily make your own screensaver from your pictures and videos files. You can add background music and select from over 100 stunning picture transition effects. Screensaver Wonder is extremely easy to use. You can create standard screensaver file and install it on your system automatically. You can also create standalone, self-installing screensavers for easy distribution and sharing with your friends. Key features: * Create screensavers from your pictures and/or video files * Add background music from MP3, WAV, WMA and MID sound files * Select fro...

[ace-users] Re: a little bug of ACE-5.4.1+TAO-1.4.1+CIAO-0.4.1.tar.gz
Hi Adam, Please upgrade to ACE+TAO x.4.8, which you can download from http://deuce.doc.wustl.edu/Download.html under the heading "latest beta kit". The DOC groups at Washington University, UC Irvine, and Vanderbilt University only provide "best effort" support for non-sponsors for the latest beta kit, as described in http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-bug-process.html Thus, if you need more "predictable" help for ACE 5.4.1, I recommend that you check out http://www.cs.wustl.edu/~schmidt/commercial-support.html for a list of companies that will provide you with ACE+TAO commercial support. Thanks, Doug >> When I compile this version, it prompts me the following errors that >> /*------ >> gmake[6]: *** No rule to make target `Client_Request_Interceptor.cpp', >> needed by `.obj/Client_Request_Interceptor.o'. Stop. >> ------*/ >> >> Then I find there is something wrong about the directory: >> /export/home/adam/ace.5.4.1.cc.64/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow >> There are two files whose file names suffix are very strange. >> 1. Client_Request_Interceptor.cp >> 2. Server_Request_Interceptor.cp >> After I rename them from .cp to .cpp >> >> I wonder if this is a bug or some thing I configure wrong? >> >> Regards, >> Adam >> -...

PostgreSQL 7.4.2 on SunOS 4.1.4
This is a multi-part message in MIME format. ----=_NextPart_ST_14_41_31_Wednesday_June_09_2004_4593 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Back in December 2002, Warren Spencer asked this question: > I'm attempting to install PostgreSQL on a SunOS 4.1.4 box. So far, > I've tried various combinations of gcc 2.95.1,.2,.3, PostgreSQL 7.1.3, > 7.0.3, 7.3. In some cases, gcc won't build. In others, PostgreSQL > won't build. But in the gcc 2.95.2/pg 7.1.3 case, I've got exactly &g...

Differences between gnat 4.4.5 and 4.5.1
I recently started learning Ada using Fedora 14 and gcc-gnat 4.5.1 as my development environment and a copy of John Barne's book. I have another computer on which I installed Debian Squeeze and gcc-gnat-4.4.5. Both versions of gcc-gnat (I think it's gcc-gnat, the man pages describe it as GNU gnat) are the default versions from the distribution repositories. However, I noticed some differences in the generated executables created by these two compilers and I thought it worth investigating. The following (admittedly silly) program demonstrates the issue: -- with Ada.Strings.Wide_...

[News] KDE SC 4.4.4 is Out, a Look at KDE Partition Manager 1.1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 KDE Software Compilation 4.4.4 Out http://www.kdenews.org/2010/06/01/kde-software-compilation-444-out KDE Software Compilation 4.4.4 Release Announcement ,----[ Quote ] | June 1st, 2010. Today, KDE has released a | new version of the KDE Software Compilation | (KDE SC). This month's edition of KDE SC is a | bugfix and translation update to KDE SC 4.4. | KDE SC 4.4.4 is a recommended update for | everyone running KDE SC 4.4.3 or earlier | versions. As the release only contains | bugfixes and translation updates, it wi...

Newbie question; why (cons (list 1 2) (list 3 4)) is ((1 2) 3 4) and not ((1 2) (3 4))
Hi, I just started to learn LISP, and stumbled in SICP upon (cons (list 1 2) (list 3 4)) is evaluated to ((1 2) 3 4) I do not understand why this is not: ((1 2) (3 4)) because (cdr (cons (list 1 2) (list 3 4))) is (3 4) and (car (cons (list 1 2) (list 3 4))) is (1 2) Is there a logical explanation? Thank you for your patience. -- Greg Out of order, gregor <gregor@ediwo.com> writes: > Is there a logical explanation? Yes. > I just started to learn LISP, and stumbled in SICP upon But first, let's talk about LISP, Lisp, Scheme and Common Lisp. LISP is the name of the programming language invented in 1959 by John McCarthy and of the first program implementing it written amongst other by Steve Russel, one of his students. LISP 1.5 is a segueing version of that same program dating about 1962 that had some distribution. Then various lisp languages were developed at various places by various teams. Names such as MacLisp, InterLisp, LeLisp, StandardLisp, vLisp, Lisp Machine Lisp, Scheme, GNU Emacs Lisp, etc. It was quite a mess, and people had a hard time sharing programs. So they talked and designed and wrote and voted and produced the ANSI Common Lisp standard (in the USA), meanwhile in Europe they produced the ISO Lisp standard. Nowadays, almost all the other lisps are "dead", with only scheme (current version r5rs, r7r...

Serialization between Java 1.1.4 and Java 1.4.1
Hello, It seems to me to be in some kinda trouble. I wanted to implement communication between Java applet and Server through sockets and Serialization. So, I serialize Object, send it to server which deserialize it with no problems. In other direction problems came out since Object serialized under Java 1.4.1 seems to be not deserializable under Java 1.1.4. (MS VM). If applet si run under J2, there are no problems, but I cannot push people to download some 15MB of new JRE just to accomplish my requirements, especially if applet needs not implementation of features of new JRE... ...

RE: [ace-users] segfault on linux x86-64 with ACE/TAO 5.4.4/1.4.4
Hi Lothar, Thanks for using the PRF form. It looks that one of the pointers to strcmp is zero, maybe that results in the crash. Could you post a small test app that reproduces the problem? Regards, Johnny Willemsen Remedy IT Postbus 101 2650 AC Berkel en Rodenrijs The Netherlands www.theaceorb.nl / www.remedy.nl > ACE VERSION: 5.4.4 > > HOST MACHINE and OPERATING SYSTEM: > uname -a > Linux janus 2.6.11.4-20a-default #1 Wed Mar 23 21:52:37 UTC > 2005 x86_64 x86_64 > x86_64 GNU/Linux > > TARGET MACHINE and OPERATING SYSTEM, if different from HOST: > COMPILER NAME AND VERSION (AND PATCHLEVEL): > gcc-4.0.0 --version > gcc-4.0.0 (GCC) 4.0.0 > > CONTENTS OF $ACE_ROOT/ace/config.h [if you use a link to > a platform- > specific file, simply state which one]: > cat /opt2/linux/x86_64/ACE/1.4.4/ACE_wrappers/ace/config.h > #define ACE_HAS_XML_SVC_CONF > #include "ace/config-linux.h" > > CONTENTS OF > $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless > this isn't used in this case, e.g., with Microsoft Visual C++): > cat > /opt2/linux/x86_64/ACE/1.4.4/ACE_wrappers/include/makeinclude/ > platform_macros.GNU > > # configure ACE/TAO for our use > > debug=1 > optimize=1 > exceptions=1 > threads=1 > inline=1 > rtti=1 > versioned_so=1 > interface_repo=1 > ssl=...

RE: [ace-users] segfault on linux x86-64 with ACE/TAO 5.4.4/1.4.4 #2
Hi, > Thanks for the reply. > The reason why I posted the stacktrace is that I have > currently no clue how to > reproduce a small testcase. But I will keep trying. > > I had the hope that someone familiar with ACE_Malloc_T<> > could shed light on > this subject. As I said the curious thing is that it works > with 32bit and > fails with 64bit. The only thing that I can imagine off is that somewhere a 64bit pointer is by accident handled as 32bit. Johnny ...

Web resources about - 1/4 to 4/4 - comp.databases.ms-access

A startup that helps police track criminals using bitcoin just raised $5 million
A startup that helps law enforcement agencies in the US and UK catch criminals that are using bitcoin has raised $5 million (£3.5 million) from ...

iPhone SE could rejuvenate Apple and encourage growth in new markets
We're living in the age of the smartphone and Apple has managed to carve itself a decent-sized chunk of the pie. But while each new iPhone is ...

Turkey hunts three more would-be bombers after Istanbul attack: newspapers
Reuters Turkey hunts three more would-be bombers after Istanbul attack: newspapers Reuters ISTANBUL Turkish newspapers carried front-page ...

Full Episode: GMA 03/20/16: HS Students Survive Devastating Bus Crash in Indiana
Paris Terror Suspect Admits Pulling Out of Suicide Bombing; Spring Cleaning Offers Opportunity to Start Fresh

Captured Paris attack suspect 'worth weight in gold' to police: lawyer
The only suspected participant in Nov. 13 Paris attacks to be captured alive has been cooperating with police investigators and is "worth his ...

Watch a Guy Discover How Human Flesh Would Taste Using a Biopsy From His Leg
Ever wondered how tasty you are? In this video, Greg Foot has a biopsy of muscle taken from his leg in order to discover what it tastes like. ...

Tennis tourney director: Women ‘ride on coattails of men’
INDIAN WELLS, Calif. (AP) — The tournament director of the BNP Paribas Open criticized the WTA Tour on Sunday, saying women’s pro tennis players ...

A Top Ted Cruz Advisor Thinks Islamists Are Infiltrating the NRA
The National Rifle Association's annual board election is typically a drama-free affair. But this year, things are getting ugly. A faction within ...

Amy Adams Shines At ‘Batman Vs. Superman’ Premiere, Talks Strengths Of Lois Lane
As usual, Amy Adams has once again graced the public with her class and charm. On Sunday, the 41-year-old actress attended the premiere of one ...

Senate Republican leader: No lame-duck hearing of court pick
WASHINGTON (AP) — No Supreme Court hearings, no votes, not during regular business or a postelection lame-duck session, the Senate's majority ...

Resources last updated: 3/21/2016 11:27:11 AM