L
lin qin
when i execute following query, it displays error.
SELECT [mod], region, Sum(rev) AS srev, Sum(qty) AS sqty,
srev/sqty AS cru
FROM Table1
GROUP BY [mod];
the following query is correct:
SELECT [mod], region, Sum(rev) AS srev, Sum(qty) AS sqty,
srev/sqty AS cru
FROM Table1
GROUP BY [mod],region;
however, I don't understand I need to add"[]"in mod column,
and if i want to see the column region in the result but I
don't want to group by region,(only group by mod). how can
i modify the first query to let it run correctly.
SELECT [mod], region, Sum(rev) AS srev, Sum(qty) AS sqty,
srev/sqty AS cru
FROM Table1
GROUP BY [mod];
the following query is correct:
SELECT [mod], region, Sum(rev) AS srev, Sum(qty) AS sqty,
srev/sqty AS cru
FROM Table1
GROUP BY [mod],region;
however, I don't understand I need to add"[]"in mod column,
and if i want to see the column region in the result but I
don't want to group by region,(only group by mod). how can
i modify the first query to let it run correctly.