Good Evening, Good Morning Wherever you are whenever you may be reading this.
I am new to this email group and have some good experience with SQL and
PostgreSQL database.
I am currently working on a PHP / PostgreSQL project and I came upon something
I could not figure out in SQL. I was wonderi
In response to Neil Stlyz :
> Good Evening, Good Morning Wherever you are whenever you may be reading this.
>
> I am new to this email group and have some good experience with SQL and
> PostgreSQL database.
>
>
> I am currently working on a PHP / PostgreSQL project and I came upon something
> I
Hi,
SELECT
(SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-02-01') as
count1,
(SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-20') as
count2,
(SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-01') as
count3
Serge
> Good Evenin
Hi,
SELECT
(SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-02-01') as
count1,
(SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-20') as
count2,
(SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-01') as
count3
Serge
> Good Evenin
msi77 wrote:
> Hi,
>
> SELECT
> (SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-02-01')
> as count1,
> (SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-20')
> as count2,
> (SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-01')
>
Hi,
I have a two tables:
article
articleID, name, content
tags
articleID, tag
I want to find all articles that are tagged with "a" but not "b"
how do I do this?
what I'd like to do is:
select articleID from tags where tag="a"
SUBTRACT
select articleID from tags where tab="b"
how do I do t
8q5tmky...@sneakemail.com написа:
Hi,
I have a two tables:
article
articleID, name, content
tags
articleID, tag
I want to find all articles that are tagged with "a" but not "b"
how do I do this?
what I'd like to do is:
select articleID from tags where tag="a"
SUBTRACT
select articleID fro
Darrell,
Can you provide a little more information and background on your problem.
please?
What values can the "tag" column assume? Just "a" and "b" ?
Both?
Please give examples of table contents and desired output, your mail doesn't
contain enough info to give you more advises
Thank you
Hi Darrell,
SELECT DISTINCT articleID FROM tags WHERE tag = "a"
EXCEPT
SELECT DISTINCT articleID FROM tags WHERE tag = "b";
Regards,
Andreas
-Ursprüngliche Nachricht-
Von: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] Im
Auftrag von 8q5tmky...@sneakemail.com
G
8q5tmky...@sneakemail.com <8q5tmky...@sneakemail.com> wrote:
> Hi,
>
> I have a two tables:
>
> article
> articleID, name, content
>
> tags
> articleID, tag
>
> I want to find all articles that are tagged with "a" but not "b"
>
> how do I do this?
select a.* from article left join tags t on
Andreas Kretschmer wrote:
8q5tmky...@sneakemail.com <8q5tmky...@sneakemail.com> wrote:
Hi,
I have a two tables:
article
articleID, name, content
tags
articleID, tag
I want to find all articles that are tagged with "a" but not "b"
how do I do this?
select a.* from article left joi
I'm really trying to understand how the tablefunc crosstab function works, to
no avail.
I have a table that looks like this:
customer_id integer
date timestamp with time zone
amount numeric(10,4)
There are rows in this table every-time a customer gets charged an amount,
which is multiple times
I'm flying blind here since I have nothing that looks like the structure you
described to experiment on, but based on some crosstabs I have set up this
should get you started. Explanatory notes follow.
SELECT pivot.*
FROM crosstab('
--row header, column header, cell value
SELECT customer_i
On 2010-02-01, at 11:34 , Lee Hachadoorian wrote:
> You basically have three parts:
>
> 1) SELECT query in the form (row header, column header, cell value). In this
> case it is an aggregate query so that you can sum the transactions over a
> given day.
>
> 2) List of column headers. If you wa
The output column data type (day1, day2, etc.) is supposed to match the
value data type. I used numeric(10,4) because that's what your original post
specified, but the billed_duration column in your most recent post looks
like it might be integer? (Or is it defined as numeric(10,4), but you never
e
On 2010-02-01, at 14:22 , Lee Hachadoorian wrote:
> The output column data type (day1, day2, etc.) is supposed to match the value
> data type. I used numeric(10,4) because that's what your original post
> specified, but the billed_duration column in your most recent post looks like
> it might be
On Mon, Feb 1, 2010 at 3:11 PM, Adam Sherman wrote:
> Actually, the query I was running is:
>
> SELECT
>cust_id as customer,
>date_trunc(''day'', date) AS day,
> SUM(billed_duration)/60.0::numeric(10,4) AS minutes
>
> billed_duration is an integer. Make sense?
>
> If billed_duration i
17 matches
Mail list logo