Any help, please?
On 6/5/07, Loredana Curugiu <[EMAIL PROTECTED]> wrote:
Hi everybody,
I have the following table:
count | theme | receiver| date
| dates
|
---+---+---
Loredana Curugiu wrote:
Any help, please?
So I have the following query:
SELECT SUM(A.count),
A.theme,
A.receiver,
A.dates
FROM my_table A
INNER JOIN my_table B
ON A.theme=B.theme
AND A
So I have the following query:>>
>>SELECT SUM(A.count),
>> A.theme,
>> A.receiver,
>> A.dates
>> FROM my_table A
>> INNER JOIN my_table B
>> ON A.theme=B.theme
>> AND A.receiver=B.receive
Loredana Curugiu wrote:
So I have the following query:>>
>>SELECT SUM(A.count),
>> A.theme,
>> A.receiver,
>> A.dates
>> FROM my_table A
>> INNER JOIN my_table B
>> ON A.theme=B.theme
>>
"Loredana Curugiu" <[EMAIL PROTECTED]> writes:
> I am trying to say that sum column it is not calculated correctly.
It looks like your counts are high. That would imply that your join clauses
are matching more than one combination of rows. Ie, it's counting some rows
multiple times because there
Hi everybody,
I have the following table:
count | theme | receiver| date
| dates
|
---+---+--++
Hey, Loredana.
Please advice me,
you need to sum for a certain pair (Theme, receiver) the number that appears
on count for every record whose date is in dates column, is this correct?
But in what record's dates column? On all of them? Or just the dates column
of the records that have that (Theme
You don't actually say what's wrong. What are you expecting as output?
I should obtain the following result:
sum | theme | receiver |
dates
+--+--+
8 | CRIS | +4074
Hello,
I need to create a rule, but I need that it have a WHERE clause, how bellow:
CREATE RULE rule_role_sul AS
ON SELECT TO t1 WHERE roles = 'role_sul'
DO INSTEAD
SELECT field1, field2 FROM t2;
CREATE RULE rule_role_sul AS
ON SELECT TO t1 WHERE roles = 'role_norte'
DO IN
Loredana Curugiu wrote:
You don't actually say what's wrong. What are you expecting as output?
I should obtain the following result:
[snip]
Well, I've attached a test script using your example data and a copy of
my results. Nothing leaping out as wrong here. It's entirely possible
I've not
Loredana Curugiu wrote:
> Hi everybody,
>
> I have the following table:
>
> count | theme | receiver| date
> | dates
>|
> ---+---+--
> CREATE RULE rule_role_sul AS
> ON SELECT TO t1 WHERE roles = 'role_sul'
> DO INSTEAD
> SELECT field1, field2 FROM t2;
>
> CREATE RULE rule_role_sul AS
> ON SELECT TO t1 WHERE roles = 'role_norte'
> DO INSTEAD
> SELECT field3, field4 FROM t2;
From: http://www.po
On 6/5/07, Oliveiros Cristina <[EMAIL PROTECTED]> wrote:
Hey, Loredana.
Hi Oliveiros! Nice to "see" you again!
Please advice me,
you need to sum for a certain pair (Theme, receiver) the number that
appears on count for every record whose date is in dates column, is this
correct?
Yap.
Bu
On 6/5/07, Loredana Curugiu <[EMAIL PROTECTED]> wrote:
On 6/5/07, Oliveiros Cristina <[EMAIL PROTECTED]> wrote:
>
> Hey, Loredana.
Hi Oliveiros! Nice to "see" you again!
Please advice me,
> you need to sum for a certain pair (Theme, receiver) the number that
> appears on count for every rec
Hey, Loredana.
Nice to "see" you too ;-)
Thank you for your detailed clarifications.
Hmm...try to add the following clause to your INNER JOIN
AND A.date = B.Date
Like this :
INNER JOIN view_sent_messages B
ON A.theme=B.theme
AND A.receiver=B.receiver
AND A.d
On Jun 5, 2007, at 8:11 , Ranieri Mazili wrote:
CREATE RULE rule_role_sul AS
ON SELECT TO t1 WHERE roles = 'role_sul'
DO INSTEADSELECT field1, field2 FROM t2;
CREATE RULE rule_role_sul AS
ON SELECT TO t1 WHERE roles = 'role_norte'
DO INSTEADSELECT field3, field4 FRO
Hmm...try to add the following clause to your INNER JOIN
AND A.date = B.Date
Like this :
INNER JOIN view_sent_messages B
ON A.theme=B.theme
AND A.receiver=B.receiver
AND A.date = b.Date
AND B.date=ANY (A.dates)
Doesn't work. I get the result
Hello again, Loredana.
Additional information required :-)
imagine the following situation
1| LIA | recv1 | date1 | (date1,date2)
2|LIA | recv1 |date 1 | (date2,date3)
3| LIA | recv1 | date1 | (date1,date3)
Should this yield 6? Or 4?
date 1 is not on the second dates column, but it is on the
On 6/5/07, Oliveiros Cristina <[EMAIL PROTECTED]> wrote:
Hello again, Loredana.
Additional information required :-)
imagine the following situation
1| LIA | recv1 | date1 | (date1,date2)
2|LIA | recv1 |date 1 | (date2,date3)
3| LIA | recv1 | date1 | (date1,date3)
Should this yield 6? Or 4
And , still, in your query, you are grouping by A.dates... is there any reason
for this that I am missing ?
SELECT SUM(A.count),
A.theme,
A.receiver,
A.dates
FROM my_table A
INNER JOIN my_table B
ON A
We should have a onliner contest. I love oneliners!!!
oneliner:
select date_trunc('month',now()) + ((8 - extract('dow' from date_trunc
('month',now()))||'days')::text)::interval;
Kristo
On 04.06.2007, at 19:39, Michael Glaesemann wrote:
---(end of broadcast)--
On 6/5/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
We should have a onliner contest. I love oneliners!!!
+1 on that
---(end of broadcast)---
TIP 6: explain analyze is your friend
Marko Kreen wrote:
On 6/5/07, Brian Mathis <[EMAIL PROTECTED]> wrote:
pgcrypto also supports md5, so I'm not sure what you're referring to
here.
digest(psw, 'md5') vs. crypt(psw, gen_salt('md5'))
As I already mentioned, *salting* before you hash is a very
important step. I'm not sure if you
I'm having troubles using multiple OUTER JOINs, which I think I want
to use to solve my problem.
My problem is to find all non-translated string values in our
translations database, given the 4 following tables:
SOURCE (source_id PRIMARY KEY, language_id, value, ...)
TRANSLATION (translatio
24 matches
Mail list logo