Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A82CC851 for ; Thu, 24 May 2012 21:19:33 +0000 (UTC) Received: (qmail 35018 invoked by uid 500); 24 May 2012 21:19:32 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 34976 invoked by uid 500); 24 May 2012 21:19:32 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 34968 invoked by uid 99); 24 May 2012 21:19:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 21:19:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of edlinuxguru@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pb0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 21:19:25 +0000 Received: by pbbrq8 with SMTP id rq8so1088696pbb.35 for ; Thu, 24 May 2012 14:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=k37XF/n0yqcKZkJ3Lj0057x0a7f6SnXtoL0qhVZJzcg=; b=Zq6k308ekcu6qcRyXa142lD3GvBKtQ81EupjTXvgqcdGKtf66QZAwjjn8CkXBdZcTZ c2QJUSbPN9Cxf/JiNrR7RtCrjs7SgeX2Jz+A20cT9Csbs9/G1iHTKDDbiGXZcWvDXqAV BwvciUVlNx4VGAkO6syBoyv3Blzu9Grm1XHpwcEY9YI/CyWgbwKgz+phrt6BcgZz0l5f nWdEpE9Vc7w1gZNDEfLVnngbMhrvSi1Rqq2Qvpu/z3emawS54VdBHgk34T5pd5T+K01R BCGr1Ydf0FA0xaFo5PkS4GxHxNxqW+uGbcXuHxNOdalH+2ON06ksmH4QAPcN7g865jBU aSZg== MIME-Version: 1.0 Received: by 10.50.196.232 with SMTP id ip8mr737483igc.50.1337894345456; Thu, 24 May 2012 14:19:05 -0700 (PDT) Received: by 10.64.18.176 with HTTP; Thu, 24 May 2012 14:19:05 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 May 2012 17:19:05 -0400 Message-ID: Subject: Re: SQL help From: Edward Capriolo To: user@hive.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hive is not SQL 92 compliant or whatever. https://cwiki.apache.org/Hive/languagemanual.html in particular you can not do subselects inside the in or the where clause. Hive usually have other formulations like left semi join that makes things 'like in' and 'not in' possible. Edward On Thu, May 24, 2012 at 5:13 PM, Mohit Anchlia wro= te: > I am now trying to do it this way but doesn't work in hive. I think I am > missing something here, can someone please help? > > select a_id from web_data t1 where a_id =3D (select min(a_id) from web_da= ta t2 > where t2.t_timestamp =3D t1.t_timestamp) > > I get: > > > FAILED: Parse Error: line 1:69 cannot recognize input near 'select' 'min' > '(' in expression specification > > > > On Thu, May 24, 2012 at 1:02 PM, Mohit Anchlia > wrote: >> >> I am new to Hive. I have several SQL from RDBMS database that I need to >> convert to hive. What's the best reference for HIVEQL? For now I am tryi= ng >> to figure out how to do this in hive: >> >> Select=A0 distinct A_ID, First_Value(path IGNORE NULLS) over(PARTITION B= Y >> A_ID ORDER BY t_timestamp) From WEB_DATA >> >> Any help would be appreciated. > > >