todo : replace alias with complete name in where clause