🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.sqlinfo
Article #338

Query for a shopping basket.

#338
From: Deenen
Date: Thu, 16 Sep 1999 00:00
13 lines
1311 bytes
Hello. I want to run a query on a shopping basket, and also go the count of
every duplicate record. I've got this far...
Fetches the selected items if they exist in the master productlisting.
SELECT ordre.id, ordre.kunde, ordre.varenr AS [prod], produkter.navn,
produkter.pris, produkter.innhold FROM ordre INNER JOIN produkter ON
ordre.varenr = produkter.id WHERE (((ordre.kunde)=:kunde));

Gets the total price of all items listed in the shopping-basket related to
the customer no. :kunde
SELECT DISTINCTROW ordre.kunde, Sum(ordre.pris) AS [totalsum] FROM ordre
GROUP BY ordre.kunde HAVING (((ordre.kunde)=:kunde));

How to combine these two?
Technical Details
Message-ID: <Cq2E3.870$uV5.10219@news1.online.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11355a,4c8967ef80305219,start
X-Google-Attributes: gid11355a,public
From: "Deenen" <deeenen@online.no>
Subject: Query for a shopping basket.
Date: 1999/09/16
Message-ID: <Cq2E3.870$uV5.10219@news1.online.no>
X-Deja-AN: 525788720
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: news-abuse@online.no
X-Trace: news1.online.no 937472802 195.70.181.235 (Thu, 16 Sep 1999 11:06:42 MET DST)
Organization: Telenor Online Public Access
X-MSMail-Priority: Normal
NNTP-Posting-Date: Thu, 16 Sep 1999 11:06:42 MET DST
Newsgroups: bit.listserv.sqlinfo