You can't drag Query.MANDT and other columns directly into Built in SQL Functions.
if you want to get any unique value or assign some default value use the variable to initialize.
Once you've all these values in variable you can use them in SQL function.