0
is that possible to select twice a column from a table and modify only one of them?
eg: select count(company), count(company) from customer but I want to filter only one of the column with let's say where invoice is not null I have tried to specify their name but it's seems to be invalid to differentiate column from a same table by only changing their name and apply name.invoice command neither the join, union works
2 Respuestas
+ 1
Dude, you must specify it after the WHERE clause and if you wish multiple cases either run two separate queries using union or use the operator OR in the WHERE conditions, which does not make too much sense. Ex:
SELECT company
From table
Where (company is not null);
0
thank your for answering, I know this can be done by joining multiple queries
but does that means there is no possible approach to differentiate the same column that has been called twice in just one query?