Have you tried:
select UserName, Sum(ColB) from Table group by UserName;
or
select UserName, Sum(ColB) from Table group by UserName where
UserName="Emily";
Mike
At 11:43 AM 1/12/2011, Nicholas Moreno wrote:
My issue is actually in Excel. I'm hoping someone could help me...
I need to to
My issue is actually in Excel. I'm hoping someone could help me...
I need to total the values in column B for "Emily". Is there a way other
than =SUM (B1+B2+B4+B7)?
--
Emily | 1
-
Emily | 5
-
Greg | 2
-
Bob | 7
-
Emily | 4
---
Hi there,
I have a WEIRD question, that I can't find an answer too...
Here is my stored function:
DELIMITER $$
USE `mydatabase`$$
DROP FUNCTION IF EXISTS `SPLIT_STR`$$
CREATE definer=`thisus...@`%` FUNCTION `SPLIT_STR`(
X VARCHAR(255),
delim VARCHAR(12),
pos INT
) RETURNS VARCHAR(255) CH
DROP FUNCTION IF EXISTS secs_to_hrs;
DELIMITER |
create function secs_to_hrs (secs varchar(10))
returns varchar(13)
DETERMINISTIC
BEGIN
return CONCAT_WS(' h ',lpad(secs/60 div 60,3,' ') ,
CONCAT(lpad(round(secs/60 mod 60),2,' '),' mins') );
END;
|
DELIMITER ;
What if I wanted to not display mi
There is also a LAST_DAY() function that returns the last day of the month:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Peter Brawley wrote:
> # of days since the first of the month from last month
datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01'
> # of days since the first of the month from last month
datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01')))
> the # of days since the end of last month (e.g. from 5/31/07)
datediff(now(),date_sub(concat(date_format(now(),'%Y-%m-'),'01'),INTERVAL
1 DAY))
PB
-
Andr
Can someone advise the best way to determine
a) the # of days since the first of the month from last month (e.g. from
5/1/07)
b) the # of days since the end of last month (e.g. from 5/31/07)
Is there are a good way to determine the # of workdays in a month.
Thanks,
Andrey
--
MySQL General Mai
At 18:23 +0200 6/22/03, Anthony W. wrote:
Hi,
I'm just wondering is there a function instead of update to overwrite data
that has expired??
Or can mysql automatically deletes records or rows that has expires just
like cookies delete themselves after expiring.
Cookies don't "delete themselves" afte
Hi,
I'm just wondering is there a function instead of update to overwrite data
that has expired??
Or can mysql automatically deletes records or rows that has expires just
like cookies delete themselves after expiring.
Thanx for the info
Anthony
--
MySQL General Mailing List
For list archives
;s how it's listed in the manual.
>
> date_add([thedatefield],Interval 15 day)
>
> Mark
>
> -Original Message-
> From: Serge Paquin [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 10:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: DATE function questio
5 AM
To: [EMAIL PROTECTED]
Subject: Re: DATE function question
I believe the following will work:
date_add([thedatefield],Interval 15 days)
I am almost sure I got the syntax right off the top of my head. Check
mysql.com for "date functions" if the above doesn't work.
Serge.
On
I believe the following will work:
date_add([thedatefield],Interval 15 days)
I am almost sure I got the syntax right off the top of my head. Check mysql.com for
"date functions" if the above doesn't work.
Serge.
On Wed, 26 Mar 2003 10:16:18 -0500
"Tom Ray" <[EMAIL PROTECTED]> wrote:
> I hav
I have a small question about the DATE function. This is what I want to do:
- User enters information into form and submits it to database
- When info is added to database the current date is stored ala 2003-03-26
- Now I want to take that date 2003-03-26 and tack on either 15 or 30 days
on to it
ld1) as 'field-1'
from tmp
group by keyf;
-Original Message-
From: Javier [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 8:11 AM
To: [EMAIL PROTECTED]
Subject: Sum function question
Hi, I have a table like this
Key Field-1
A string1
A
Hi Javier,
> Hi, I have a table like this
>
>Key Field-1
>A string1
>A string2
>A string3
>B string1
>B string 2
>
> I want to create a query to get the following result (only one line by key
> field):
>
>A - string1,string2,string3
Hi, I have a table like this
Key Field-1
A string1
A string2
A string3
B string1
B string 2
I want to create a query to get the following result (only one line by key
field):
A - string1,string2,string3
B - string1,string2
I try to u
- Original Message -
From: Javier <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 20, 2002 2:47 PM
Subject: Sum function question
> Hi, i have a table like this
>
> Key Field-1
> A string1
> A string2
> A
Hi, i have a table like this
Key Field-1
A string1
A string2
A string3
B string1
B string 2
I want to create a query to get the following result (only one line by key
field):
A - string1,string2,string3
B - string1,string2
I try to use the Sum function but it
18 matches
Mail list logo