Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67451B467 for ; Tue, 10 Jan 2012 06:35:47 +0000 (UTC) Received: (qmail 28035 invoked by uid 500); 10 Jan 2012 06:35:38 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 25979 invoked by uid 500); 10 Jan 2012 06:35:17 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 25962 invoked by uid 99); 10 Jan 2012 06:35:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 06:35:14 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aniket486@gmail.com designates 209.85.160.176 as permitted sender) Received: from [209.85.160.176] (HELO mail-gy0-f176.google.com) (209.85.160.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 06:35:06 +0000 Received: by ghbg15 with SMTP id g15so2286862ghb.35 for ; Mon, 09 Jan 2012 22:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5Quzsr16z3NZo6A2AFCLQ9uAiwR2aylTycNyGEzqpxU=; b=N/Q9xf81MRqpCecGlUKBDVxjwVDGR2xTkw+P0SruTbtVnGGfpCgBQwPDHiCbVMM2sR YovJUL1sVDM2NaVfemkw4IFWbciwNVrw+dNfKsGig8xPpL1dWtfCaRJa3EwrRej4VEg2 lzhtM4YRylExpjjp2Y72/zhrmKm6RNpA/AMhk= MIME-Version: 1.0 Received: by 10.236.181.168 with SMTP id l28mr24792344yhm.53.1326177285839; Mon, 09 Jan 2012 22:34:45 -0800 (PST) Received: by 10.236.146.40 with HTTP; Mon, 9 Jan 2012 22:34:45 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Jan 2012 22:34:45 -0800 Message-ID: Subject: Re: How to calculate count of quarter wise record in Hive? From: Aniket Mokashi To: dev@hive.apache.org Cc: user@hive.apache.org Content-Type: multipart/alternative; boundary=20cf3056398f081b0204b626b6d7 X-Virus-Checked: Checked by ClamAV on apache.org --20cf3056398f081b0204b626b6d7 Content-Type: text/plain; charset=ISO-8859-1 select quarter, COUNT(*) from table group by quarter? On Mon, Jan 9, 2012 at 10:06 PM, Bhavesh Shah wrote: > Hello, > I want to calculate count of quarter wise record in Hive. > (e.g.: In 1st Quarter - 72 (counts) likewise for other quarter) > > How can we calculate it through query or UDF in Hive? > > -- > Thanks and Regards, > Bhavesh Shah > -- "...:::Aniket:::... Quetzalco@tl" --20cf3056398f081b0204b626b6d7--