2011/10/24 16:31 -0700, Daevid Vincent
WHERE cs.customer_id = 7
GROUP BY customer_id
Well, the latter line is now redundant.
How will you make the '7' into a parameter?
--
MySQL General Mailing List
For list archives: http://l
October 24, 2011 4:06 PM
> To: mysql@lists.mysql.com
> Subject: RE: Within-group aggregate query help please - customers and
latest
> subscription row
>
> A kind (and shy) soul replied to me off list and suggested this solution,
> however,
> this takes 28 seconds (that's f
-
> From: Daevid Vincent [mailto:dae...@daevid.com]
> Sent: Monday, October 24, 2011 1:46 PM
> To: mysql@lists.mysql.com
> Subject: Within-group aggregate query help please - customers and latest
> subscription row
>
> I know this is a common problem, and I've been struggling
I know this is a common problem, and I've been struggling with it for a full
day now but I can't get it.
I also tried a few sites for examples:
http://www.artfulsoftware.com/infotree/queries.php#101
http://forums.devarticles.com/general-sql-development-47/select-max-datetime
-problem-10210.html
I wondered if anyone can help me ? Do you need any further information ?
Cheers
Neil
-- Forwarded message --
From: Tompkins Neil
Date: Thu, Sep 23, 2010 at 9:49 AM
Subject: Query help please
To: "[MySQL]"
Hi all,
I've the following
Hi all,
I've the following query :
SELECT fixtures_results.seasons_id ,
home_teams_id AS teams_id ,
1 AS home ,0 AS away ,
(SELECT SUM(goals) FROM players_appearances WHERE
fixtures_results.fixtures_results_id =
players_appearances.fixtures_results_id AND players_appearances.teams_id =
home_teams
Anders,
>I also want to find out the user's position relative to others
depending on the result.
For a given pUserID, something like this?
SELECT userid,result,rank
FROM (
SELECT o1.userid,o1.result,COUNT(o2.result) AS rank
FROM object o1
JOIN object o2 ON o1.result < o2.result OR (o1.resu
On Dec 11, 2007, at 10:46 AM, Rob Wultsch wrote:
On Dec 11, 2007 8:38 AM, Anders Norrbring <[EMAIL PROTECTED]> wrote:
I'm looking at a situation I haven't run into before, and I'm a bit
puzzled by it.
I have this table structure:
Table USERS: userid, class
Table OBJECT: userid, class, result
On Dec 11, 2007 8:38 AM, Anders Norrbring <[EMAIL PROTECTED]> wrote:
> I'm looking at a situation I haven't run into before, and I'm a bit
> puzzled by it.
>
> I have this table structure:
>
> Table USERS: userid, class
> Table OBJECT: userid, class, result
>
> Now I want to query the database for
I'm looking at a situation I haven't run into before, and I'm a bit
puzzled by it.
I have this table structure:
Table USERS: userid, class
Table OBJECT: userid, class, result
Now I want to query the database for a certain user's result in a
specified class, which is very, very easy. No proble
This should work
DELETE Item FROM Item,ItemTag WHERE Item.ProductID =ItemTag.ItemID AND
ItemTag.TagID = '168'
Mark Kelly wrote:
Hi
I want to delete from the 'Item' table all the items identified by the
folowing query:
SELECT
Item.ProductID
FROM
Item, ItemTag
WHERE
ItemTag.
The following query should work if I understand what you're attempting
correctly. Use at your own risk though ;)
DELETE FROM Item USING Item, ItemTag WHERE ItemTag.ItemID =
Item.ProductID AND ItemTag.TagID = '168';
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Hi.
On Thursday 05 July 2007 17:35, you wrote:
> > I want to delete from the 'Item' table
> > all the items identified by the folowing query:
>
> If you have MySQL 5+, you can do it using a sub-query:
>
> DELETE FROM
> Item
> WHERE
> ProductID IN (
> SELECT
> Item.ProductID
> FROM
> It
> I want to delete from the 'Item' table
> all the items identified by the folowing query:
If you have MySQL 5+, you can do it using a sub-query:
DELETE FROM
Item
WHERE
ProductID IN (
SELECT
Item.ProductID
FROM
Item, ItemTag
WHERE
ItemTag.TagID = '168'
AND
ItemTag.Ite
Hi
I want to delete from the 'Item' table all the items identified by the
folowing query:
SELECT
Item.ProductID
FROM
Item, ItemTag
WHERE
ItemTag.TagID = '168'
AND
ItemTag.ItemID = Item.ProductID;
but I'm not sure how to go about it. Can anyone help?
Thanks
Mark
--
My
I would look at the 15th URL to see if there are specials in there that are
breaking the hash somehow.
On 5/22/07, Ben Benson <[EMAIL PROTECTED]> wrote:
I'm having problems getting a monitoring script to run.
I've put the troublesome bit in a separate script just to test, and it
goes
like
I'm having problems getting a monitoring script to run.
I've put the troublesome bit in a separate script just to test, and it goes
like this:
declare -a HNdeclares the array "HN"
HN=(`echo "SELECT url FROM hosts" | mysql --user=netmon --password=n3tm0n
--skip-column-names
> When I execute the following query I get duplicate
> product_id's as shown
> below:
>
> SELECT * FROM product, product_category_xref, category WHERE
> product_parent_id=''
> AND product.product_id=product_category_xref.product_id
> AND category.category_id=product_category_xref.category_id
> AND
When I execute the following query I get duplicate product_id's as shown
below:
SELECT * FROM product, product_category_xref, category WHERE
product_parent_id=''
AND product.product_id=product_category_xref.product_id
AND category.category_id=product_category_xref.category_id
AND product.product_p
[snip]
So if the end result is to have the records selected appended to the
Customer_Equipment table, I have to make a temporary table based on the
characteristics of the Customer_Equipment table... then insert from that
temporary table. Correct?
[/snip]
BINGO! Goofy rules can be frustrating
Greetings Jay:
RE: mySQL query help please
I love rules that don't make sense ;-)
So if the end result is to have the records selected appended to the
Customer_Equipment table, I have to make a temporary table based on the
characteristics of the Customer_Equipment table... then insert
[snip]
INSERT INTO Customer_Equipment SELECT Customer.ID, Server_ID,
Configuration, Equipment_Type, Group_ID, Location, Rack_Location,
Network_Status_Name, Creator_ID, Primary_IP_Address FROM
Customer_Equipment, Customer WHERE SUBSTRING(Server_ID, 5,4) =
Customer.User_ID;
The select statement wor
Greetings:
RE: mySQL query help please
INSERT INTO Customer_Equipment SELECT Customer.ID, Server_ID,
Configuration, Equipment_Type, Group_ID, Location, Rack_Location,
Network_Status_Name, Creator_ID, Primary_IP_Address FROM
Customer_Equipment, Customer WHERE SUBSTRING(Server_ID, 5,4
One more thing... What are you using to pull the data? PHP? Perl?
Etc?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: Query help please!
I need help writing query that would give me parent
Do you have another table with all the birthdates in it?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: Query help please!
I need help writing query that would give me parent categories of
I need help writing query that would give me parent categories of catID from
categories table.
For example, if catID=030 then it should give me:
Birthday | Special Birthday | Special Birthday
If catID=028
Birthday | General Birthday | NULL
>desc categories
+---+--+--
Hi all,
I was hoping that I could get some help with this query.
TABLE: Items
FIELDS: ProductDescription, ItemPrice, ItemDate
I want to group first by the week day using the WeekDay function, Sum the
item price for each Weekday and order next by the sum of the item price for
each weekday in D
27 matches
Mail list logo