且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

选择:按功能分组

更新时间:2023-02-05 18:12:16

您可以将查询包装在外部查询中,以隔离函数调用并使用别名:

You can wrap your query in an external one to isolate the function call and use an alias:

select count(*),
       status
from ( 
        select s.*,
               my_function(entity_id) as status
        from some_Table s
     )
group by status
order by status