Postgresql PostgresSQL将值的方差替换为1个标准值

Postgresql PostgresSQL将值的方差替换为1个标准值,postgresql,Postgresql,我有一个包含多重价值的专栏,比如科学硕士、艺术硕士等等 如何将所有这些价值观转化为硕士学位。然后计算具有硕士学位的值。您可以在下面的查询中尝试替换 select case when columnName like UPPER('%master%' ) then 'Master degree' end master_degree from tableName 您可以在下面的查询中尝试计数 select count(*) as total_degree from tableName where c

我有一个包含多重价值的专栏,比如科学硕士、艺术硕士等等
如何将所有这些价值观转化为硕士学位。然后计算具有硕士学位的值。

您可以在下面的查询中尝试替换

select case when columnName like UPPER('%master%' ) then 'Master degree' end master_degree
from tableName

您可以在下面的查询中尝试计数

select count(*) as total_degree
from tableName
where columnName like UPPER('%master%' )

请添加示例数据、预期输出以及您迄今为止尝试的内容。