hi. can you give more details ? how is effective_price for today
calculated - for example if u need price for 11th oct 2006, i'm
assuming all u need is the price for date_from / date_to when there's
a match in the range.
yashesh bhatia.
On 10/7/06, abhishek jain <[EMAIL PROTECTED]> wrote:
Hi,
Hi,
I have a table like :
ID date_from date_to price_code price dateadded
1 07:10:2006 31:12:2099 p11007:10:06
2 17:10:2006 31:12:2099 p12007:10:06
3 27:10:2006 31:12:2099 p11007:10:06
4 01:11:2006 31:12:2099 p12007:10:06
5 05:10:2
How about:
SELECT DISTINCT `key`, COUNT(`key`) AS c
FROM `table` WHERE `value` in (8,9,10)
HAVING c=3;
Clever! Thanks :-)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Morten wrote:
Hi,
Given the table keyval(key int(11), val int(11)), I would like to be
able to retrieve the keys for which a row exist for given X values.
Example:
key value
18
19
110
28
38
310
48
49
410
411
Given values 8, 9, 10 the query should t
Morten wrote:
Hi,
Given the table keyval(key int(11), val int(11)), I would like to be
able to retrieve the keys for which a row exist for given X values.
Example:
key value
18
19
110
28
38
310
48
49
410
411
Given values 8, 9, 10 the query should t
Peter Brawley wrote:
>Can this be expressed somewhat more elegantly than multiple EXISTS
subqueries?
>SELECT DISTINCT key FROM keyval outer
>WHERE EXISTS (SELECT * FROM keyval inner
>WHERE outer.key = inner.key
>AND inner.val = 8)
>AND EXISTS (SELECT * FROM keyval inner
>WHE
>Can this be expressed somewhat more elegantly than multiple EXISTS
subqueries?
>SELECT DISTINCT key FROM keyval outer
>WHERE EXISTS (SELECT * FROM keyval inner
>WHERE outer.key = inner.key
>AND inner.val = 8)
>AND EXISTS (SELECT * FROM keyval inner
>WHERE outer.key = inner.key
>
Hi,
Given the table keyval(key int(11), val int(11)), I would like to be
able to retrieve the keys for which a row exist for given X values.
Example:
key value
18
19
110
28
38
310
48
49
410
411
Given values 8, 9, 10 the query should thus return 1 an
[EMAIL PROTECTED] wrote:
Mike Blezien <[EMAIL PROTECTED]> wrote on 10/04/2005 10:08:24 AM:
Hello,
[EMAIL PROTECTED] wrote:
Mike Blezien <[EMAIL PROTECTED]> wrote on 10/04/2005 08:34:56
AM:
Hello,
I am trying to put together a single query from across 4 tables and
not having a
pro
Mike Blezien <[EMAIL PROTECTED]> wrote on 10/04/2005 10:08:24 AM:
> Hello,
>
>
> [EMAIL PROTECTED] wrote:
> > Mike Blezien <[EMAIL PROTECTED]> wrote on 10/04/2005 08:34:56
AM:
> >
> >
> >>Hello,
> >>
> >>I am trying to put together a single query from across 4 tables and
> >>not having a
>
Hello,
[EMAIL PROTECTED] wrote:
Mike Blezien <[EMAIL PROTECTED]> wrote on 10/04/2005 08:34:56 AM:
Hello,
I am trying to put together a single query from across 4 tables and
not having a
problem getting the results needed. table structure:
#
Mike Blezien <[EMAIL PROTECTED]> wrote on 10/04/2005 08:34:56 AM:
> Hello,
>
> I am trying to put together a single query from across 4 tables and
> not having a
> problem getting the results needed. table structure:
> ##
> CREATE TABLE IF NOT
Hello,
I am trying to put together a single query from across 4 tables and not having a
problem getting the results needed. table structure:
##
CREATE TABLE IF NOT EXISTS job_posts (
jobid int(6) unsigned NOT NULL auto_increment,
job_vacan
This is a bit vague.
How about showing what you have done, and how it is not what you wan't.
Colleen Dick wrote:
I am building a SELECT using a left join and I almost have what I want.
One of the fields that gets sucked in from the left join is either
null or has a value in it.
if it is null I
I am building a SELECT using a left join and I almost have what I want.
One of the fields that gets sucked in from the left join is either null
or has a value in it.
if it is null I only want to include the rows from the main table where
the field isdemo=1
if that field has a value in it I wan
[EMAIL PROTECTED] wrote:
>
> Here is a FABRICATED table I have TYPED OUT to demonstrate the information
> that I'm looking for.
> I'm looking for a single query that can produce:
>
> +--+--++---+
> | clientid | revision | name
here's the scoop:
Basically I'm listing pieces of information from a two-key table and I am
not getting the information I want.
BACKGROUND
Consider this sample table (which although goofy, does illustrate what I'm
attempting to do)
SELECT clientid, revision, name, address FROM clients;
+--
Hi there,
I'm new on this list because of a long query I can't write
successfully. I guess I could post my question on a more general SQL
list but since my database engine is MySQL I post it here. It's a bit
long to read because of the care taken to explain all things. Please
forgive me if I'
18 matches
Mail list logo