質問編集履歴

2

コードの内容と記述方法を変更しました

2019/12/02 00:52

投稿

im_a_begginer
im_a_begginer

スコア7

test CHANGED
File without changes
test CHANGED
@@ -20,8 +20,6 @@
20
20
 
21
21
  GROUP_ID 04 がどう頑張っても0で表示されません。(項目にも現れません)
22
22
 
23
- ![![イメージ説明](9341eeb192705bfd6b371b9c634c3a46.png)](045f4dc7bb69f0a9576a05f67ff7c362.png)
24
-
25
23
 
26
24
 
27
25
 
@@ -42,6 +40,14 @@
42
40
 
43
41
 
44
42
 
43
+
44
+
45
+
46
+
47
+ ```OracleDB,SQL
48
+
49
+ 私の回答(0の表示なし)
50
+
45
51
  select grouptable.group_id,count(membertable.group_id)
46
52
 
47
53
  from grouptable,membertable
@@ -54,55 +60,53 @@
54
60
 
55
61
  テーブル、データのコード
56
62
 
57
- CREATE TABLE "SYSTEM"."GROUPTABLE"
63
+ CREATE TABLE GROUPTABLE
58
64
 
59
- ( "GROUP_ID" CHAR(2 BYTE),
65
+ (GROUP_ID CHAR(2 BYTE),
60
66
 
61
- "GROUP_NAME" VARCHAR2(20 BYTE),
67
+ GROUP_NAME VARCHAR2(20 BYTE),
62
68
 
63
- "AREA" VARCHAR2(10 BYTE)
69
+ AREA VARCHAR2(10 BYTE))
64
70
 
65
71
 
66
72
 
67
- Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('01','新宿Aグループ','新宿');
73
+ Insert into GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('01','新宿Aグループ','新宿');
68
74
 
69
- Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('02','新宿Bグループ','新宿');
75
+ Insert into GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('02','新宿Bグループ','新宿');
70
76
 
71
- Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('03','渋谷Aグループ','渋谷');
77
+ Insert into GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('03','渋谷Aグループ','渋谷');
72
78
 
73
- Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('04','渋谷Bグループ','渋谷');
79
+ Insert into GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('04','渋谷Bグループ','渋谷');
74
80
 
75
81
 
76
82
 
77
- CREATE TABLE "SYSTEM"."MEMBERTABLE"
83
+ CREATE TABLE MEMBERTABLE
78
84
 
79
- ( "MEMBER_ID" CHAR(3 BYTE),
85
+ (MEMBER_ID CHAR(3 BYTE),
80
86
 
81
- "AGE" NUMBER(2,0),
87
+ AGE NUMBER(2,0),
82
88
 
83
- "GROUP_ID" CHAR(2 BYTE)
89
+ GROUP_ID CHAR(2 BYTE))
84
90
 
85
91
 
86
92
 
87
- Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('001',20,'02');
93
+ Insert into MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('001',20,'02');
88
94
 
89
- Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('002',30,'03');
95
+ Insert into MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('002',30,'03');
90
96
 
91
- Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('003',60,'01');
97
+ Insert into MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('003',60,'01');
92
98
 
93
- Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('004',40,'03');
99
+ Insert into MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('004',40,'03');
94
100
 
95
- Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('005',40,'02');
101
+ Insert into MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('005',40,'02');
96
102
 
97
- Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('006',50,'03');
103
+ Insert into MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('006',50,'03');
98
-
99
-
100
104
 
101
105
  ```
102
106
 
103
- SQL,oracle
107
+ ![![イメージ説明](9341eeb192705bfd6b371b9c634c3a46.png)](045f4dc7bb69f0a9576a05f67ff7c362.png)
104
108
 
105
- ```
109
+
106
110
 
107
111
 
108
112
 

1

テーブル、データのSQLを付けました

2019/12/02 00:52

投稿

im_a_begginer
im_a_begginer

スコア7

test CHANGED
File without changes
test CHANGED
@@ -21,6 +21,10 @@
21
21
  GROUP_ID 04 がどう頑張っても0で表示されません。(項目にも現れません)
22
22
 
23
23
  ![![イメージ説明](9341eeb192705bfd6b371b9c634c3a46.png)](045f4dc7bb69f0a9576a05f67ff7c362.png)
24
+
25
+
26
+
27
+
24
28
 
25
29
  ### 発生している問題・エラーメッセージ
26
30
 
@@ -46,7 +50,53 @@
46
50
 
47
51
  group by grouptable.group_id;
48
52
 
53
+
54
+
49
- 上記
55
+ テーブル、データのコード
56
+
57
+ CREATE TABLE "SYSTEM"."GROUPTABLE"
58
+
59
+ ( "GROUP_ID" CHAR(2 BYTE),
60
+
61
+ "GROUP_NAME" VARCHAR2(20 BYTE),
62
+
63
+ "AREA" VARCHAR2(10 BYTE)
64
+
65
+
66
+
67
+ Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('01','新宿Aグループ','新宿');
68
+
69
+ Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('02','新宿Bグループ','新宿');
70
+
71
+ Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('03','渋谷Aグループ','渋谷');
72
+
73
+ Insert into SYSTEM.GROUPTABLE (GROUP_ID,GROUP_NAME,AREA) values ('04','渋谷Bグループ','渋谷');
74
+
75
+
76
+
77
+ CREATE TABLE "SYSTEM"."MEMBERTABLE"
78
+
79
+ ( "MEMBER_ID" CHAR(3 BYTE),
80
+
81
+ "AGE" NUMBER(2,0),
82
+
83
+ "GROUP_ID" CHAR(2 BYTE)
84
+
85
+
86
+
87
+ Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('001',20,'02');
88
+
89
+ Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('002',30,'03');
90
+
91
+ Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('003',60,'01');
92
+
93
+ Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('004',40,'03');
94
+
95
+ Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('005',40,'02');
96
+
97
+ Insert into SYSTEM.MEMBERTABLE (MEMBER_ID,AGE,GROUP_ID) values ('006',50,'03');
98
+
99
+
50
100
 
51
101
  ```
52
102