Hi, This is the first time I have used the SQL forum.
At the moment my SQL looks like this
(select distinct count("AST_Asset"."Asset_ID_")
from
AST_Asset
where
"AST_Asset"."Type" = 'ROUTER'
and
("AST_Asset"."Status" = '6' or "AST_Asset"."Status" = '0') )
this gives me a figure of 1034. I would like to group by region but am having trouble. I have been given this SQL but do not understand the way it is ment to work. I get the following error message. The column prefix AST_Asset does not match the the table name or alias name used in the query. I would like it to show me the assets for each region and group them by region. Can you help please?
(select distinct count("AKA"."Asset_ID_")
from AST_Asset AKA
where "AKA"."Region" = "AST_Asset"."Region"
and
"AKA"."Type" = 'ROUTER')
At the moment my SQL looks like this
(select distinct count("AST_Asset"."Asset_ID_")
from
AST_Asset
where
"AST_Asset"."Type" = 'ROUTER'
and
("AST_Asset"."Status" = '6' or "AST_Asset"."Status" = '0') )
this gives me a figure of 1034. I would like to group by region but am having trouble. I have been given this SQL but do not understand the way it is ment to work. I get the following error message. The column prefix AST_Asset does not match the the table name or alias name used in the query. I would like it to show me the assets for each region and group them by region. Can you help please?
(select distinct count("AKA"."Asset_ID_")
from AST_Asset AKA
where "AKA"."Region" = "AST_Asset"."Region"
and
"AKA"."Type" = 'ROUTER')