Hi Gang,
I'm trying to optimize a query:
This query below returns something like this:
event_id | eu_tid | event_name | event_when | day | mon |
start | end|event_users |
contact_phone| contact_pager | num_opps
--++-
On Mon, Mar 07, 2005 at 04:22:15PM -, John McGough wrote:
> +---+---++-+--+
> | ID | JobID | UserID | Finished | Comment |
> +---+---++-+--+
This table output doesn't look like PostgreSQL's usual format.
> but I keep getting MySQL err
John McGough wrote:
SELECT Count(*) FROM Work WHERE (UserID='user1' AND MAX(Finished)=0)
Work:-
+---+---++-+--+
| ID | JobID | UserID | Finished | Comment |
+---+---++-+--+
| 1 | 1| user1 | 0 | ...|
| 2
SELECT Count(*) FROM Work WHERE (UserID='user1' AND MAX(Finished)=0)
Work:-
+---+---++-+--+
| ID | JobID | UserID | Finished | Comment |
+---+---++-+--+
| 1 | 1| user1 | 0 | ...|
| 2 | 1|
Hello!
"Luis Sousa" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is a cryptographically signed message in MIME format.
>
> --ms080209060900030807050408
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7
Tell me what did you try with limit and group by.
Where's IN, why don't you use EXISTS instead. It runs much master !
Regards,
Luis Sousa
Arcadius A. wrote:
Hello!
I hope that someone here could help.
I'm using PostgreSQL7.1.3
I have 3 tables in my DB: the tables are defined in the following
Hello!
I hope that someone here could help.
I'm using PostgreSQL7.1.3
I have 3 tables in my DB: the tables are defined in the following way:
CREATE TABLE category(
id SERIAL NOT NULL PRIMARY KEY,
// etc etc
)
;
CREATE TABLE subcategory(
id SERIAL NOT NULL PRIMARY KEY,
categoryid int CONSTRAI