On Sat, Apr 5, 2008 at 9:28 PM, Jonathan Mangin <[EMAIL PROTECTED]> wrote:
> select itemized.day_date as day_date,
> round(sum(my_menu.carb * units) + simple.carb,2)
> from itemized inner join simple using (uid) inner join my_menu on
> itemized.personal_id = my_menu.id where itemized.uid = 'me'
Hi,
Here's the basic query I'm trying. It's supposed to return
the totals of each nutrient (carb, in this case) by date.
The data totals 218.31, but I get 190.80.
select itemized.day_date as day_date,
round(sum(my_menu.carb * units) + simple.carb,2)
from itemized inner join simple using (uid) in
Jonathan,
Jake provided useful suggestions & answered your question. For
elaboration of Jake's tip, see the manual page for GROUP BY for how
joins affect grouping.
PB
-
Jonathan Mangin wrote:
- Original Message - From: "Jake Peavy" <[EMAIL PROTECTED]>
To: "Jonathan Mangin" <[E
- Original Message -
From: "Jake Peavy" <[EMAIL PROTECTED]>
To: "Jonathan Mangin" <[EMAIL PROTECTED]>
Cc:
Sent: Saturday, April 05, 2008 11:59 AM
Subject: Re: Incorrect results from sum
On 4/5/08, Jonathan Mangin <[EMAIL PROTECTED]> wrote:
I'm getting incorrect results from a sum
On 4/5/08, Jonathan Mangin <[EMAIL PROTECTED]> wrote:
>
> I'm getting incorrect results from a sum and wonder if
> anyone sees something obviously wrong. (Won't surprise
> me.) Leaving 'simple' out of the equation (or adding
> 'simple' values manually) gets me the correct number.
>
> $menu is a per
I'm getting incorrect results from a sum and wonder if
anyone sees something obviously wrong. (Won't surprise
me.) Leaving 'simple' out of the equation (or adding
'simple' values manually) gets me the correct number.
$menu is a personalized table of meal/recipe ingredients.
itemized is a list of
Hi,
> if i have for example
> a simple table call person
>
> with 'id' and 'name' how columns
>
> i can do a backup and get some file (A.sql)
> with all the inserts statements
>
> here, all fine
>
> but
> how i can do this?
Have a look at the 'mysqldump' command line utility.
It goes somethin