Hive CLI runs this query just fine: select department_type, count(*) as total_walkins, count(distinct user_id) as unique_walkers from userstore.walkin w join locations.locations loc on w.location_id = loc.id where loc.chain_id = 56876135 and to_date (time_stamp) >= '2011-08-07' and to_date (time_stamp) <= '2011-08-13' and w.did_succeed=1 group by department_type;
But giving this to Hive server gives: Query returned non-zero code: 11, cause: FAILED: Parse Error: line 1:0 cannot recognize input 'and' -Ayon See My Photos on Flickr Also check out my Blog for answers to commonly asked questions.