pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Landin Hostbaek <mich@the-lab.org>
To: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Where clause
Date: Tue, 26 Jun 2007 11:44:53 +0200
Message-ID: <20070626094453.GH67974@mich2.itxmarket.com> (raw)
In-Reply-To: <20070626090140.GB28610@a-kretschmer.de>
References: <20070626082405.GA67974@mich2.itxmarket.com>
	<20070626090140.GB28610@a-kretschmer.de>

A. Kretschmer (andreas.kretschmer) writes:
> *untested*
> 
> select cid, sum(case when click = true then 1 else 0 end), sum(case when
> view = true then 1 else 0 end) from ...
> 

Thanks, but I need the DISTINCT contactid - I don't want the same
contactid counted twice.

Mike



view thread (10+ messages)  latest in thread

Message-ID: <20070626094453.GH67974@mich2.itxmarket.com>
Permalink:  ../20070626094453.GH67974@mich2.itxmarket.com/
Also on:    postgresql.org/message-id/20070626094453.GH67974@mich2.itxmarket.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mich@the-lab.org, andreas.kretschmer@schollglas.com
  Subject: Re: Where clause
  In-Reply-To: <20070626094453.GH67974@mich2.itxmarket.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox