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 100k rows that I have to process if I remove
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
the grouping and I think that will be very slow.
Anyone have
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 grouping
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 100k rows that I have to process if I
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
the grouping and I think that will be very slow
. 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
the grouping and I think
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 100k rows that I have to process if I
.
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 aggregating
myself. But this query
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 grouping from the SQL and do all the grouping and aggregating
myself
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
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
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 key thing
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)
,
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, although
Name, List Membership
from PHPLIST2 AS Z
WHERE eMail IS NOT NULL
GROUP by Q
Natheless, I want 'Email' for both names. How can I make it take 'Email' after
'AS' for the grouping? (The outcome is the same whether I write 'Z.email' or
'Email'.)
--
MySQL General Mailing List
For list archives: http
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 only
-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 you know how to solve it.
thanks!
--
MySQL General Mailing List
For list archives
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]
, 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]
, 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
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
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 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
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
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
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
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
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 contact table looks
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
and I'm doing
this in my free time I kinda want to take my
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
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
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
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 fastest
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 customer B
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
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,
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
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.ID
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)
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
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
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
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
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 - actually
I
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
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
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
- 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 think you mean to say that your table has 3
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
)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 time
(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 time
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
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-20
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 10:46:12 |
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 |
++-+---+-+
with 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 | recdate | mount | perused
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
- ORDER BY
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
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
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://lists.mysql.com/[EMAIL PROTECTED]
|
|
--
MySQL
]
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).
I store dates as GMT in the db, but sometimes I want to count the
number
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
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
Minky
- Original Message -
From: Director General
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 and Priveleges in MySQL
The simple answer is no. MySQL is first and foremost
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
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
:[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
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
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
: 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
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 |
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
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://order.mysql.com/?ref=ensita
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. If you want the data
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
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 first email
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]
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
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]
[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
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:
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
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 |
++---++
| 96-655
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 always found
:[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 | |
| 4 | BAD |
| 5
:
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
it's
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 / sorting
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
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 offer
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
|
| 447781484245 |
| 447967305499 |
| 447812106198 |
| 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
|
| 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='2
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
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
database.
SELECT tblVisitorHits.vIP, tblVisitorHits.vDateTime
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 trying to design a little browser/ip
tracking page
).
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, tblVisitorHits.vDateTime
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
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(timestamp)
of grouping on a primary table? I tried selecting a
MAX on the timestamp field, in the hope that somehow the resolution of that
maximum would leave the other fields in the record sticky to the position
that the maximum was found... with no success...
I really would like to avoid changing the structure
1 - 100 of 108 matches
Mail list logo