Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8881E9F9677 for ; Wed, 12 Sep 2007 00:56:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 28898-06 for ; Wed, 12 Sep 2007 00:56:20 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web54301.mail.re2.yahoo.com (web54301.mail.re2.yahoo.com [206.190.49.111]) by postgresql.org (Postfix) with SMTP id B7D459F953C for ; Wed, 12 Sep 2007 00:56:20 -0300 (ADT) Received: (qmail 10941 invoked by uid 60001); 12 Sep 2007 03:56:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Kf6RJx0lvPlr157Y3Wht6Rza5VU6Ji4AVc0H96cRAzFOCTKIrnIhsHqCbNXBJq14BDkbDwW3avpY1nK5QODDru9hmewA0Bg4OXG6IUu2wv3KBEtN7LmLlwWn+yPQyW3HgEcteNyhmtuxPQDRrNbwKlVBzvLdgSDeOeRMQVOc5C4=; X-YMail-OSG: b_t3e6sVM1nf7pIBkTqFG1Va2eODWzcrFymFYXICp4ZigVwe_h.zz6UCoI.2X4c04zv3f5q6kTpTu_9Iv53Td86bMhRLlLAlAyX3.8NRXiXndEExnq8yQNbfsQwRwQ-- Received: from [69.229.233.47] by web54301.mail.re2.yahoo.com via HTTP; Tue, 11 Sep 2007 20:56:19 PDT Date: Tue, 11 Sep 2007 20:56:19 -0700 (PDT) From: chester c young Subject: Re: Extracting hostname from URI column To: ogjunk-pgjedan@yahoo.com Cc: sql pgsql In-Reply-To: <750084.67431.qm@web50306.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <696778.6801.qm@web54301.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/96 X-Sequence-Number: 29309 > And what I'd like is something that would give me the counts for the > number of occurrences of each unique hostname. Something much like > `uniq -c'. Can anyone tell me how that's done or where I should look > for info? (I'm not sure what to look for, that's the problem). > select substring( ... ), count(1) from your_table group by 1; ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469