質問編集履歴

1

sql文を<code>で囲みました

2018/05/07 06:35

投稿

enpitsu
enpitsu

score8

test CHANGED
File without changes
test CHANGED
@@ -10,9 +10,11 @@
10
10
 
11
11
 
12
12
 
13
- **結合したいカラム①②**
13
+ **結合したいカラム**
14
14
 
15
+ ```sql
16
+
15
- SELECT a.PVDT, count(a.id) as PV
17
+ SELECT a.PVDT, count(a.id) as PV
16
18
 
17
19
  FROM (select date_format(from_unixtime(dt),'%Y-%m-%d') as PVDT,id from wp.wp_slim_stats) a
18
20
 
@@ -20,11 +22,15 @@
20
22
 
21
23
  ORDER BY a.PVDT
22
24
 
25
+ ```
26
+
23
27
  ![イメージ説明](fad57f958b87e5255b7c7e6182231694.png)
24
28
 
25
29
 
26
30
 
31
+ ```sql
32
+
27
- SELECT b.VIDT, count(b.visit_id) as VI
33
+ SELECT b.VIDT, count(b.visit_id) as VI
28
34
 
29
35
  FROM (SELECT date_format(from_unixtime(dt),'%Y-%m-%d') as VIDT, visit_id, browser_type FROM wp.wp_slim_stats
30
36
 
@@ -34,11 +40,17 @@
34
40
 
35
41
  group by b.VIDT
36
42
 
43
+ ```
44
+
37
45
  ![イメージ説明](9df1e404ec1ab9ca2d93630aafc53882.png)
38
46
 
39
47
 
40
48
 
41
49
  **試したSQL文(表示できない)**
50
+
51
+
52
+
53
+ ```sql
42
54
 
43
55
  SELECT a.PVDT,count(a.id) as VI, b.VIDT, count(b.visit_id) as VI
44
56
 
@@ -53,3 +65,5 @@
53
65
  GROUP BY a.PVDT,b.VIDT
54
66
 
55
67
  ORDER BY a.PVDT,b.VIDT
68
+
69
+ ```