国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

Multiple在表中的計算

2024-07-21 02:33:27
字體:
來源:轉載
供稿:網友

  create table myTable (
  this Varchar2(10),
  that Varchar2(10)
  );
  
  insert into myTable values ('that'   , 'the other');
  insert into myTable values ('confusing', 'the other');
  insert into myTable values ('this'   , 'that'   );
  insert into myTable values ('this'   , 'that'   );
  insert into myTable values ('that'   , 'confusing');
  insert into myTable values ('confusing', 'that'   );
  insert into myTable values ('confusing', 'confusing');
  insert into myTable values ('that'   , 'the other');
  insert into myTable values ('this'   , 'that'   );
  insert into myTable values ('confusing', 'the other');
  
  select
  count(
  case when
  this = 'that' and
  that = 'the other'
  then 1
  else null end) "Count 1",
  count(
  case when
  this = 'this' and
  that = 'that'
  then 1
  else null end) "Count 2",
  count(
  case when
  this = 'confusing'
  then 1
  else null end) "Count 3"
  from
  myTable;

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 连南| 临颍县| 张北县| 平山县| 桐梓县| 丰都县| 濮阳市| 溧阳市| 海伦市| 荣昌县| 永川市| 咸阳市| 宝鸡市| 安溪县| 布拖县| 德兴市| 治县。| 嘉义县| 芜湖县| 丰台区| 阿克| 灵璧县| 南华县| 通州市| 龙里县| 抚州市| 北流市| 莱芜市| 区。| 古田县| 琼海市| 宜阳县| 镇雄县| 龙井市| 小金县| 承德县| 西昌市| 南城县| 简阳市| 台前县| 札达县|