combined.
>
> In python I can easily parse the data and identify the rows that need
> to be combined, but then I've lost the ability to calculate the
> average and std. The only way I can think of to do this is to remove
> the grouping from the SQL and do all the grouping and aggreg
ntify the rows that need
to be combined, but then I've lost the ability to calculate the
average and std. The only way I can think of to do this is to remove
the grouping from the SQL and do all the grouping and aggregating
myself. But this query often returns 20k to 30k rows after grouping.
It c
>>>>> row 5: 5.1, 10.1
>>>>> row 6: 6.0, 7.9
>>>>> row 7: 8.0, 21.0
>>>>> row 8: 100, 200
>>>>>
>>>>> 1 through 6 get combined because all their X values are within the
>>>>> tolerance of som
the X or Y value is within the
tolerance of any X or Y in the set that was combined.
In python I can easily parse the data and identify the rows that need
to be combined, but then I've lost the ability to calculate the
average and std. The only way I can think of to do this is to remove
the g
ause all their X values are within the
>>>> tolerance of some other X in the set that's been combined. 7's Y value
>>>> is within the tolerance of 2's Y, so that should be combined as well.
>>>> 8 is not combined because neither the X or Y value is w
the set that was combined.
In python I can easily parse the data and identify the rows that need
to be combined, but then I've lost the ability to calculate the
average and std. The only way I can think of to do this is to remove
the grouping from the SQL and do all the grouping and aggre
t that's been combined. 7's Y value
>> is within the tolerance of 2's Y, so that should be combined as well.
>> 8 is not combined because neither the X or Y value is within the
>> tolerance of any X or Y in the set that was combined.
>>
>> In python I can
e combined, but then I've lost the ability to calculate the
average and std. The only way I can think of to do this is to remove
the grouping from the SQL and do all the grouping and aggregating
myself. But this query often returns 20k to 30k rows after grouping.
It could easily be 80k to 10
ty to calculate the
average and std. The only way I can think of to do this is to remove
the grouping from the SQL and do all the grouping and aggregating
myself. But this query often returns 20k to 30k rows after grouping.
It could easily be 80k to 100k rows that I have to process if I remove
th
On 2013-09-23 8:10 PM, Jeremiah Jester wrote:
Hello,
How would i go about selecting 5
random cars that are flagged as internet_special (value 1) for each
dealer from a specific table? Ive tried sub selects with no luck.
Here's a basic query that has my
required conditional. Note that I get all
Hello,
How would i go about selecting 5
random cars that are flagged as internet_special (value 1) for each
dealer from a specific table? Ive tried sub selects with no luck.
Here's a basic query that has my
required conditional. Note that I get all unique dealers by doing a
distinct(dealer_web_na
2011/04/08 17:12 -0400, Michael Dykman
Mildly surprised this is working at all. Your name alias fields like
"When" should be quoted by back-tics, no double quotes.. this is a
clarification and does not solve the issue really although it might
make your final result less surprising.
A
Mildly surprised this is working at all. Your name alias fields like
"When" should be quoted by back-tics, no double quotes.. this is a
clarification and does not solve the issue really although it might
make your final result less surprising.
A key thing to note about GROUP BY is that, althoug
Once more I am surprised by the ordering that I get from 'GROUP BY'.
This defines the table of directors that have been on the board:
CREATE TABLE DIRECTOR
( Chosen DATE NOT NULL
, Through DATE NOT NULL
, MemberIDINTEGER REFERENCES MemberAddress (MemberID)
, CONST
After more fooling around, I found that this yields something ordered by the
first field:
select REPLACE(eMail, '- ', '') AS Email, IFNULL(foreignKey, '') AS "Foreign
Key", "Full Name", "List Membership"
from PHPLIST2 AS Z
WHERE eMail IS NOT NULL
GROUP by REPLACE(eMail, '- ', '')
Is this the on
first field:
select REPLACE(eMail, '- ', '') AS Q, IFNULL(foreignKey, '') AS "Foreign Key",
"Full Name", "List Membership"
from PHPLIST2 AS Z
WHERE eMail IS NOT NULL
GROUP by Q
Natheless, I want 'Email' for both names. How can
idate from vote where voter = '$me';
> > > >
> > > > most popular:
> > > > select candidate from vote group by candidate order by count(*) desc;
> > > >
> > > > sub-select:
> > > > select candidate from vote where candida
select candidate from vote where voter = '$me';
> > >
> > > most popular:
> > > select candidate from vote group by candidate order by count(*) desc;
> > >
> > > sub-select:
> > > select candidate from vote where candidate not in (select candidate
ote group by candidate order by count(*) desc;
> >
> > sub-select:
> > select candidate from vote where candidate not in (select candidate
> > from vote where voter = '$me') group by candidate order by count(*)
> > desc;
> >
> > however, sub-selects are ve
voter = '$me') group by candidate order by count(*)
> desc;
>
> however, sub-selects are very slow, so i need to find a speedy way.
> i'm familiar with joins, but don't know how to use it for this case
> where grouping is involved.
>
> please get in touch if
very slow, so i need to find a speedy way.
i'm familiar with joins, but don't know how to use it for this case
where grouping is involved.
please get in touch if you know how to solve it.
thanks!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
symbols (grouping by symbols) between 2
specified dates, and calculate the percent of change for each symbol.
The percent of change is (the value from the last date of the
symbol - the value from the first date) / the value from the first
date.
For example I have:
SMB1, 2007-01-01, 1000
Hi,
Octavian Rasnita wrote:
Hi,
I have a table with the following columns:
symbol
date
value
I want to select all the symbols (grouping by symbols) between 2
specified dates, and calculate the percent of change for each symbol.
The percent of change is (the value from the last date of the
Hi,
I have a table with the following columns:
symbol
date
value
I want to select all the symbols (grouping by symbols) between 2 specified
dates, and calculate the percent of change for each symbol.
The percent of change is (the value from the last date of the symbol - the
value from the
Thanks a lot CJ. That's the cost of flexibility:-)
- Original Message -
From: Christian High
To: YL
Cc: mysql@lists.mysql.com
Sent: Sunday, April 22, 2007 12:45 PM
Subject: Re: Grouping Question
On 4/22/07, YL <[EMAIL PROTECTED]> wrote:
I have a co
On 4/22/07, Christian High <[EMAIL PROTECTED]> wrote:
On 4/22/07, YL <[EMAIL PROTECTED]> wrote:
>
> I have a contact table looks like
>
> id type owner_idowner_type value
> 11email21 person [EMAIL PROTECTED]
> 12phone 21
On 4/22/07, YL <[EMAIL PROTECTED]> wrote:
I have a contact table looks like
id type owner_idowner_type value
11email21 person [EMAIL PROTECTED]
12phone 21 person 303-777-
13PO Box18
I have a contact table looks like
id type owner_idowner_type value
11email21 person [EMAIL PROTECTED]
12phone 21 person 303-777-
13PO Box18 business 220
14cell
: Tuesday, April 03, 2007 12:15 AM
> To: mysql@lists.mysql.com
> Subject: Joins versus Grouping/Indexing: Normalization Excessive?
>
> So I'm currently designing a database for a web site and
> intra net for my
> campuses student radio. Since I'm not getting paid for this
>
I think you're approaching this from the wrong angle. You'll want to put
the data at the highest level at which it changes.
i.e. If every song on an album is always the same year, put it at the
album level, however, if it changes from song to song on a particular
album, then you want it at the
So I'm currently designing a database for a web site and intra net for my
campuses student radio. Since I'm not getting paid for this and I'm doing
this in my free time I kinda want to take my time and have the system setup
as "perfectly" as any one college student can.
I'm currently debating on
>select column1, column2, max(column3) as maximum
>from table_name group by column 1;
>Please tell me if the values from "column2" will contain the values from
>those records where the column3 has the maximum value.
They will not.
>please tell me how to do this as fast as possible.
What's fast
Hi,
I want to use:
select column1, column2, max(column3) as maximum from table_name group by
column 1;
Please tell me if the values from "column2" will contain the values from
those records where the column3 has the maximum value.
If it doesn't, please tell me how to do this as fast as possi
Hi,
I'm not that used to MySQL, yet. I wonder if it's possible to do the
following grouping with summery on a record set?
Tha records set looks as follows:
- type
- topic
- description
- time
Example of data:
Admin Email Email to customer A 0,25
Admin Email Email to
Ahhh... I did the following:
UPDATE companies c
SET total_annual_service_charge = (SELECT SUM(annual_service_charge)
FROM purchased_services ps WHERE ps.company_id = c.id);
What think you? :-)
On 11/22/06, John Kopanas <[EMAIL PROTECTED]> wrote:
I have two tables: companies, purchased_services
I have two tables: companies, purchased_services... for each company
in the companies table I want to sum up the annual_service_charge for
each row that is associated with teh company in purchased_services.
I have the following query:
SELECT company_id, SUM(annual_service_charge) FROM purchased_
Ville Mattila wrote:
I try to get a list of all Invoices with total sum of the invoice and
paid sum of each invoices, as well as a customer name. I try following
query:
SELECT Invoices.*, SUM(InvoiceContents.Amount * InvoiceContents.Price)
AS InvoiceTotal, Customers.Name, SUM(Payments.Amount) Pa
Ville,
>SELECT Invoices.*, SUM(InvoiceContents.Amount * InvoiceContents.Price)
>AS InvoiceTotal, Customers.Name, SUM(Payments.Amount) PaidTotal,
>MAX(Payments.Date) LastPayment FROM Invoices LEFT JOIN InvoiceContents
>ON (InvoiceContents.InvoiceID = Invoices.ID) LEFT JOIN Customers ON
>(Customers
Hello all,
I'm sure that this situation is one of the most wondered questions with
JOIN clauses. Anyway, I couldn't find any clear information how to carry
out multiple joins in one query with proper results.
I have four tables:
1. Invoices
2. InvoiceContents
3. Customers
4. Payments
I try to ge
David Förster wrote:
Hi,
is there any way to get datasets sorted before they're grouped by GROUP
BY()?
I have a table of events at different locations and want to select the
newest one for each location.
However "SELECT * FROM events GROUP BY location ORDER BY date DESC"
gives me just some eve
David,
I have a table of events at different locations and want to select the
newest one for each location.
Famous & oft-asked, how to retrieve a groupwise-max values. See
http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html
PB
-
David Förster wrote:
Hi,
is t
Hi,
is there any way to get datasets sorted before they're grouped by GROUP
BY()?
I have a table of events at different locations and want to select the
newest one for each location.
However "SELECT * FROM events GROUP BY location ORDER BY date DESC"
gives me just some event per location and the
"Shaun" <[EMAIL PROTECTED]> wrote on 12/02/2005 10:09:44 AM:
> Hi,
>
> I am having a problem with using dates grouped by week where it spans
over 2
> months. I would like the query to return all hours worked by week
number,
> however week 48 is causing problems because it spans 2 months - act
Hi,
I am having a problem with using dates grouped by week where it spans over 2
months. I would like the query to return all hours worked by week number,
however week 48 is causing problems because it spans 2 months - actually I
am presuming this is the problem!
mysql> SELECT DATE_FORMAT(T.Da
How do you determine "most recent"? Is it based on the highest ID number
for a person or some datetime value you didn't show us?
This is another form of the groupwise maximum problem described here:
http://dev.mysql.com/doc/mysql/en/example-maximum-column-group-row.html
If after reading the do
If I have a table with fields
ID, NAME, VALUE
and they may be populated like
1, SHAWN, APPLE
2, TOM, BANANA
3, SHAWN, BANANA
4, JACK, GRAPES
5, TOM, APPLE
6, SHAWN, GRAPES
and I want to query all records showing only the most recent records for
each person
Any thoughts?
--
MySQL General Mai
- Original Message -
From: "Jalil Feghhi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 19, 2004 3:37 PM
Subject: Order By When Grouping
> Let's say I have a table w/ three rows: ID, Time, and Name. when I do:
>
First of all, I thin
Let's say I have a table w/ three rows: ID, Time, and Name. when I do:
select Time, Name group by Name Order By Time
MySQL selects one of the Time fields if there are rows with the same
Name and then does the ordering using this selected field (I am not sure
what is the logic but it seems it is
es data:
>
> ID (int) time (DATETIME)state (int)value (int)
>
> I want to make a state based grouping and calculate the mean of
> each grouping. The state based grouping should be done by creating a new
> group whenever the state changes, from one point in time to another.
TETIME)state (int)value (int)
I want to make a state based grouping and calculate the mean of
each grouping. The state based grouping should be done by creating a new
group whenever the state changes, from one point in time to another.
To explain what I mean I have made a small example:
ID
I have the following table definition for time series data:
ID (int) time (DATETIME)state (int)value (int)
I want to make a state based grouping and calculate the mean of
each grouping. The state based grouping should be done by creating a new
group whenever the state changes, from
grouping and latest date.
On Thursday 20 May 2004 12:49, Egor Egorov might have typed:
> Duncan Hill <[EMAIL PROTECTED]> wrote:
> > I have a table that has data that looks like:
> > ++-+---+-+
> >
> > | id | recd
On Thursday 20 May 2004 12:49, Egor Egorov might have typed:
> Duncan Hill <[EMAIL PROTECTED]> wrote:
> > I have a table that has data that looks like:
> > ++-+---+-+
> >
> > | id | recdate | mount | perused |
> >
> > ++-+-
Egor Egorov <[EMAIL PROTECTED]> wrote:
> Duncan Hill <[EMAIL PROTECTED]> wrote:
>> I have a table that has data that looks like:
>> ++-+---+-+
>> | id | recdate | mount | perused |
>> ++-+---+-+
>> | 1 | 2004-05-20
Duncan Hill <[EMAIL PROTECTED]> wrote:
> I have a table that has data that looks like:
> ++-+---+-+
> | id | recdate | mount | perused |
> ++-+---+-+
> | 1 | 2004-05-20 10:46:12 | QUAR | 80 |
> | 2 | 2004-05
I have a table that has data that looks like:
++-+---+-+
| id | recdate | mount | perused |
++-+---+-+
| 1 | 2004-05-20 10:46:12 | QUAR | 80 |
| 2 | 2004-05-20 11:05:11 | QUAR | 99 |
| 2 | 2004-05-20
Dear all,
I do have a logging table with the fields: id, error_id, logtime and message.
I am trying to create a consolidated list of log messages, syslog like, where
consecutive, identical messages are combined and replaced by for example:
"Last message repeated 5 times".
Anyone done this? Any
Hi,
Can I ask MySQL to GROUP BY id on MAX(something). For example, the query
below:
mysql> SELECT diary.date, diary.time, diary.id AS diary_id, diary.title,
-> link.to_id AS friend_id
-> FROM link
-> JOIN diary ON diary.member_id = link.to_id
-> WHERE link.from_id=10
-> ORD
select max(comments.commentid) as tagger, comments.commentref,
article.articlesubject, article.articlename, comments.commentfrom from
comments LEFT JOIN article ON comments.commentref=article.articleid GROUP
BY commentref ORDER by tagger DESC;
I have this query above.
I lists comments in ord
Is it possible to summarize and group over a result set derived from
several different tables using UNION SELECT?
For example, this is what I have:
Table1.field1
1
2
3
4
5
5
Table2.field1
1
2
3
3
And what I want to get is something like this:
1) SUM=29
2) A result set like this by grouping
t;[EMAIL PROTECTED]>
To: "Graeme B. Davis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 2:36 PM
Subject: Time zones and grouping
> Does anyone know any way to be able to group by day/week/month for an
> adjusted date (GMT -> EDT).
>
ve run into a problem when you want to GROUP BY
| DAYOFYEAR(datefield) for example, I want it to do the grouping by
EDT
| and not GMT -- is this possible?
|
| Regards,
|
| Graeme
|
|
| --
| MySQL General Mailing List
| For list archives: http://lists.mysql.com/mysql
| To unsubscribe:
http
of manually changing for every
user.
If I am not clear, I will rephrase the question again!
Thanks
Emery
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Director General: NEFACOMP" <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 15:24
Subject: Re: User Grouping an
;
Sent: Monday, October 13, 2003 15:24
Subject: Re: User Grouping and Priveleges in MySQL
> The simple answer is no. MySQL is first and foremost a Linux/UNIX and the
> MySQL Management do not care to much about Windows. I should know I used
to
> work for MySQL AB
>
> Regards
&g
Hi Group,
I am wondering whether MySQL is planning to implement Group based privileges.
To make my question clear, consider a database where some users are not allowed to
update data and other are allowed to update. Will it be possible to create a group
that has got some privileges and whenever
Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 02, 2003 2:37 PM
> > To: [EMAIL PROTECTED]
> > Subject: sorting/grouping
> >
> >
> >
> >
> > I have a very simple table.
> >
> > commentid, commentref (each field i
At 12:09 -0400 10/6/03, Cummings, Shawn (GNAPs) wrote:
For instance;
mysql> select commentid, commentref from comments GROUP BY
commentref ORDER by commentref DESC, commentid;
+---++
| commentid | commentref |
+---++
|80 |188 |
|73 |
,commentid DESC;
-Original Message-
From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 2:37 PM
To: [EMAIL PROTECTED]
Subject: sorting/grouping
I have a very simple table.
commentid, commentref (each field is an INT)
Each record is a comment... c
:
try
select commentid, commentref
from comments
ORDER by
commentref ,commentid DESC;
> -Original Message-
> From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 02, 2003 2:37 PM
> To: [EMAIL PROTECTED]
> Subject: sorting/grouping
>
&
commentid, commentref
from comments
ORDER by
commentref ,commentid DESC;
> -Original Message-
> From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 02, 2003 2:37 PM
> To: [EMAIL PROTECTED]
> Subject: sorting/grouping
>
>
>
>
> I have a v
ummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 02, 2003 2:37 PM
> To: [EMAIL PROTECTED]
> Subject: sorting/grouping
>
>
>
>
> I have a very simple table.
>
> commentid, commentref (each field is an INT)
>
> Each record is a comment... commen
try
select commentid, commentref
from comments
ORDER by
commentref ,commentid DESC;
> -Original Message-
> From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 02, 2003 2:37 PM
> To: [EMAIL PROTECTED]
> Subject: sorting/grouping
>
&
I have a very simple table.
commentid, commentref (each field is an INT)
Each record is a comment... commentid is the ID (each new record is a
higher #).. and the commentref field if the "story" the comment refers to.
I want to be able to list the stories in order from "most recent comment"
Bruce Feist wrote:
David Garamond <[EMAIL PROTECTED]> wrote:
CREATE TABLE `payments` (
`date` date NOT NULL,
`payee` varchar(255),
`amount` double
)
The 'payments' table records the amount of money that should be paid
to each person every month. But the actual cheque is only given when
Haydies wrote:
That was an amazingly vage question.
Yup, sorry for that. Accidentally sent :)
--
dave
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Victoria Reznichenko wrote:
David Garamond <[EMAIL PROTECTED]> wrote:
Can I do this with in pure SQL (instead of having to create logic in
programming language)?
What do you mean "Custom/conditional grouping"? Please, be more detailed.
Sorry, please refer to my other post. The
David Garamond <[EMAIL PROTECTED]> wrote:
CREATE TABLE `payments` (
`date` date NOT NULL,
`payee` varchar(255),
`amount` double
)
The 'payments' table records the amount of money that should be paid to
each person every month. But the actual cheque is only given when the
total accumulat
That was an amazingly vage question. But first thoughts would be yes and no.
You can do grouping, but you can't really do it conditionaly with out code.
SQL dosn't support much in the way of logic. So, basicly you do the
"conditional" part in code, then the grouping with SQL.
David Garamond <[EMAIL PROTECTED]> wrote:
> Can I do this with in pure SQL (instead of having to create logic in
> programming language)?
>
What do you mean "Custom/conditional grouping"? Please, be more detailed.
--
For technical support contracts, goto https://or
Sorry :)
i see that simbols i've written was converted into ASCII symbols. That is
what i need, but in MySQL :). So is there any collation where: a = a-umlaut
= a-with-any-other-"fix" ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://list
[Sorry for the accidental premature sending in the first post...]
CREATE TABLE `payments` (
`date` date NOT NULL,
`payee` varchar(255),
`amount` double
)
INSERT INTO payments VALUES ('2003-05-01','david',38);
INSERT INTO payments VALUES ('2003-06-02','david',13.4);
INSERT INTO payments VALUE
Can I do this with in pure SQL (instead of having to create logic in
programming language)?
Thanks in advance,
--
dave
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hallo,
Is there any UTF8 collation which groups national simbols by it's base
symbol.. For example:
if in case-insensitive a = A, is there any solution for A = A (a-umlaut) or
A ??
it would have sense in search'ing national text's, for example selecting all
people in phone book which first surnam
I'm having trouble ordering my results before grouping them. I don't
want to go into too much detail, so my simplified query without any
grouping or ordering results in:
++---++
| jobnum | milestone | shipdate |
++---+
I don't know of any way to sort before the grouping. That would be
peculiar, since the GROUP will be eliminating potentially many of those
rows.
In your case, a simple solution should be:
select jobnum, min(milestone), min(shipdate) from jobs
group by jobnum
order by 2, 3;
I've al
Thanks for everybody's help!!
This way worked for me. Clever!
Chris
... and yes... even my example was messed up
:-P
-Original Message-
From: Rudy Metzger [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 4:15 AM
To: Christopher Knight; MySQL List
Subject: RE: grouping / so
ect:
It works correct too. The data in yor excample are 9 records total.
To have grouping you must have equal values in columns wich you
incuded in group-criteria.
You have only 2 records wich have the same values in grouping
criteria...so they are grouped. The rest records are different. So
i
Knight [mailto:[EMAIL PROTECTED]
Sent: vrijdag 11 juli 2003 17:32
To: MySQL List
Subject: grouping / sorting etc..
Im having troubles getting the results I want... can someone suggest
which way to go..
mysql 4.0
A
| 1 | |
| 1 | BAD |
| 2 | |
| 3 | BAD |
| 3 | |
|
Im having troubles getting the results I want... can someone suggest which way to go..
mysql 4.0
A
| 1 | |
| 1 | BAD |
| 2 | |
| 3 | BAD |
| 3 | |
| 4 | BAD |
| 5 | |
| 5 | BAD |
| 5 | BAD |
what I want is 5 results. If there is a NULL, then ret
Believe that a respondent sent an email which appears to have been
bounced & deleted before I got a chance to view it. If you are the
person, please resend your response! Thank you.
===
Very complex Grouping and counting challenge
Can anyone o
Very complex Grouping and counting challenge
Can anyone offer guidance and suggest SQL which will assist in
resolving this complex and challenging (for me) issue? I hope that
my attempt to clearly state this problem is successful.
The Environment:
Queries and presentation using PHP Version
labels (or all lables for
bit_and). The make_set() function seems to clobber the internal grouping
function bit_or(), or is there some other reason this construct is
illegal?
Tore (using MySQL 4.0.3-beta on Tru64 UNIX)
-+
>| Destination |
>+--+
>| 447812106183 |
>| 447775906857 |
>| 447781484245 |
>| 447967305499 |
>| 447812106198 |
>| 447812106154 |
>| 447781484234 |
>| 447775906851 |
>| 447967305450 |
>+--+
>
>How do I do this with an SQL statement? The
|
| 447812106154 |
| 447781484234 |
| 447775906851 |
| 447967305450 |
+--+
How do I do this with an SQL statement? The one that I thought would work
does not take the most recent timestamp when grouping :(
mysql> SELECT DISTINCT Destination, SentDate FROM OutboundMessages WHERE
UserID
Hi all,
I am writing a PHP web page that displays some statistics based on
information in a database.
The database has a table (stats) with three fields:
ID, Sender, Text, UserID, Timestamp
I have set it up so that I get basic statistics with the following query:
SELECT Text, Count(*) FROM st
try GROUP BY (UNIX_TIMESTAMP(tVH.vDateTime) -
MOD(UNIX_TIMESTAMP(tVH.vDateTime, 300)))
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Date Interval Grouping
> Date: Tue, 26 Mar 2002 19:13:44 -0700
>
> Ok here's what I trying to do. I am t
his like 30 minutes or a full
hour).
> The reason I want this kind of grouping is that if a person hits the
page
> constantly for 5 minutes I don't want that to push other relevant IPs
down
> the listing. Here's what I have to actually select the data from the
full hour).
The reason I want this kind of grouping is that if a person hits the page
constantly for 5 minutes I don't want that to push other relevant IPs down
the listing. Here's what I have to actually select the data from the
database.
SELECT tblVisitorHits.vIP, tblV
At 9:02 AM -0500 11/3/01, Greg Sarsons wrote:
>I haven't succeeded in being able to group by time. My timestamp field
>is -mm-dd hh:mm:ss. What I would like is have a query that will
>enable me to be to group on events say every 5 minutes.
>
>I've played around with using time_to_sec(timesta
I haven't succeeded in being able to group by time. My timestamp field
is -mm-dd hh:mm:ss. What I would like is have a query that will
enable me to be to group on events say every 5 minutes.
I've played around with using time_to_sec(timestamp) to convert all the
times to seconds and then gr
1 - 100 of 111 matches
Mail list logo