Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error when doing computation with built-in function #32

Open
kristinriebe opened this issue Nov 28, 2014 · 0 comments
Open

Syntax error when doing computation with built-in function #32

kristinriebe opened this issue Nov 28, 2014 · 0 comments

Comments

@kristinriebe
Copy link

Query

SELECT 0.5*max(Mvir) as m from MDR1.BDMV where snapnum=85

Query plan

-- CALL paquExec('SELECT 0.5 * MAX AS `_0__5_*_max_Mvir_` FROM MDR1.BDMV WHERE ( `snapnum` = 85 ) ', 'aggregation_tmp_16656224')
-- USE spider_tmp_shard
-- SET @i=0-- CREATE TABLE cosmosim_user_kristin.`2014-11-28-14-08-18-8760` ENGINE=MyISAM SELECT @i:=@i+1 AS `row_id`, `_0__5_*_max_Mvir_` FROM `aggregation_tmp_16656224` 
-- CALL paquDropTmp('aggregation_tmp_16656224')

Error
Unknown column 'MAX' in 'field list'

A query like SELECT max(Mvir) as m ... works fine, I just encounter problems if I add the multiplication or subtract something etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant