"shaun thornburgh" <[EMAIL PROTECTED]> wrote on 03/17/2005
06:46:22 PM:
> Hi,
>
> I have ( among others ) three tables in my database: Claims, Expenses
and
> Mileage. A claim can contain many expense entries and many mileage
entries.
> I am using the follwing query to show the total expenses
Hello shaun,
May be with subselects you can do what you want:
SELECT C.*,(select SUM(E.Amount) from Expenses E where E.Claim_ID =
C.Claim_ID)AS Amount, (select SUM(M.Mileage) from Mileage M where M.Claim_ID =
C.Claim_ID) AS Mileage
FROM Claims C
WHERE C.Claimant_ID = '1'
st> Hi,
st> I have
Hi,
I have ( among others ) three tables in my database: Claims, Expenses and
Mileage. A claim can contain many expense entries and many mileage entries.
I am using the follwing query to show the total expenses and mileage per
claim for a particulare user:
SELECT C.*, SUM(E.Amount) AS Amount, S
A.Project_ID = 11
ORDER BY User_Firstname;
Thanks,
Shaun
From: [EMAIL PROTECTED]
To: "shaun thornburgh" <[EMAIL PROTECTED]>
CC: mysql@lists.mysql.com,[EMAIL PROTECTED]
Subject: Re: Help with a join query please!
Date: Wed, 29 Dec 2004 15:58:43 -0500
"shaun thornburgh" <[EMA
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
>
> >From: [EMAIL PROTECTED]
> >To: "shaun thornburgh" <[EMAIL PROTECTED]>
> >CC: mysql@lists.mysql.com,[EMAIL PROTECTED]
> >Subject: Re: Help with a join query please!
> >Date: Thu, 23
ticular project.
Thanks again for your help!
From: [EMAIL PROTECTED]
To: "shaun thornburgh" <[EMAIL PROTECTED]>
CC: mysql@lists.mysql.com,[EMAIL PROTECTED]
Subject: Re: Help with a join query please!
Date: Thu, 23 Dec 2004 10:14:24 -0500
So -- what's the field that relates a boo
uces exactly the same result...
>
> Any ideas?
>
> >From: Sasha Pachev <[EMAIL PROTECTED]>
> >To: shaun thornburgh <[EMAIL PROTECTED]>
> >CC: mysql@lists.mysql.com
> >Subject: Re: Help with a join query please!
> >Date: Tue, 21 Dec 2004 14:57:
Hi,
Thanks for your reply but that produces exactly the same result...
Any ideas?
From: Sasha Pachev <[EMAIL PROTECTED]>
To: shaun thornburgh <[EMAIL PROTECTED]>
CC: mysql@lists.mysql.com
Subject: Re: Help with a join query please!
Date: Tue, 21 Dec 2004 14:57:43 -0700
shaun thornbur
shaun thornburgh wrote:
Hi,
I have (among others) three tables in my database that i am struggling
with a join query on. The database holds dates for Bookings. If Users
are Allocated to a particular Project they can be booked. However if a
user is booked but then unallocated I want to be able to
Hi,
I have (among others) three tables in my database that i am struggling with
a join query on. The database holds dates for Bookings. If Users are
Allocated to a particular Project they can be booked. However if a user is
booked but then unallocated I want to be able to display all peolple
al
From: "Rhino" <[EMAIL PROTECTED]>
To: "shaun thornburgh"
<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: Re: Help with a join query please
Date: Thu, 16 Dec 2004 14:59:48 -0500
- Original Message -
From: "shaun thornburgh" <[EMAIL
- Original Message -
From: "shaun thornburgh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 16, 2004 2:02 PM
Subject: Help with a join query please
> Hi,
>
> I have (among others) three tables in my database that i am struggl
Hi,
I have (among others) three tables in my database that i am struggling with
a join query on. The database holds dates for Bookings. If Users are
Allocated to a particular Project they can be booked. However if a user is
booked but then unallocated I want to be able to display all peolple
al
13 matches
Mail list logo