I know I cannot use an alias in a where clause, but I am trying to figure out how to achieve what I need.
If I could have an alias in a where clause my sql would look like this:
SELECT IFNULL(f_tag_bottom, IFNULL(f_tag_bottom_major_axis, IFNULL(f_tag_bottom_minor_axis, IFNULL(f_tag_ch_x_bottom, IFNULL(f_tag_ch_y_bottom, NULL))))) as ftag, STDDEV(ch_x_top) FROM data_cst WHERE ftag = 'E-CD7' GROUP BY wafer_id, lot_id
But I can't use ftag in the where clause. I can't put it in a having clause, as that would exclude the already aggregated rows and I want to filter then before the aggregation. Anyone have any idea how I can do this?
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Jan 26
Reindl Harald Re: using alias in where clause
Jan 26, 2016; 01:27
Reindl Harald
Re: using alias in where clause
Jan 25
Larry Martell Re: using alias in where clause
Jan 25, 2016; 19:39
Larry Martell
Re: using alias in where clause
Jan 25
Rebecca Love Re: using alias in where clause
Jan 25, 2016; 19:01
Rebecca Love
Re: using alias in where clause
Jan 25
Johnny Withers Re: using alias in where clause
Jan 25, 2016; 19:26
Johnny Withers
Re: using alias in where clause
Jan 25
Larry Martell Re: using alias in where clause
Jan 25, 2016; 22:22
Larry Martell
Re: using alias in where clause
Jan 25
Larry Martell Re: using alias in where clause
Jan 25, 2016; 22:32
Larry Martell
Re: using alias in where clause
Jan 25
Johnny Withers Re: using alias in where clause
Jan 25, 2016; 21:48
Johnny Withers
Re: using alias in where clause
Jan 26
Hal.sz S.ndor Re: using alias in where clause
Jan 26, 2016; 08:40
Hal.sz S.ndor
Re: using alias in where clause
Jan 28
Larry Martell Re: using alias in where clause
Jan 28, 2016; 13:14
Larry Martell
Re: using alias in where clause
Jan 28
shawn l.green Re: using alias in where clause
Jan 28, 2016; 14:13
shawn l.green
Re: using alias in where clause
Jan 28
Larry Martell Re: using alias in where clause
Jan 28, 2016; 15:32
Larry Martell
Re: using alias in where clause
Jan 28
shawn l.green Re: using alias in where clause
Jan 28, 2016; 17:45
shawn l.green
Re: using alias in where clause
Jan 28
Larry Martell Re: using alias in where clause
Jan 28, 2016; 18:30
Larry Martell
Re: using alias in where clause
Jan 29
shawn l.green Re: using alias in where clause
Jan 29, 2016; 11:15
shawn l.green
Re: using alias in where clause
Jan 29
Larry Martell Re: using alias in where clause
Jan 29, 2016; 18:28
Larry Martell
Re: using alias in where clause
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!