我想做的是:
QUERY ONE看起来像这样;
SELECT ws.asset_id,ws.user_ts AS myFrom ,os.user_ts AS myTo
FROM wsdays ws LEFT
JOIN (
SELECT MAX(c.user_ts)user_ts,os.asset_id
FROM onsite os
JOIN cashup c ON c.onsite_id=os.onsite_id GROUP BY asset_id)os ON
ws.asset_id=os.asset_id,(
SELECT @sDate,@eDate)dum
WHERE (ws.asset_id=28 OR ws.asset_id=68)
QUERY ONE RESULTS
+----------+----------+----------+
| asset_id |myFrom | myTo |
+----------+----------+----------+
| 1 |15/01/01 |15/01/04 |
+----------+----------+----------+
| 2 |15/03/16 |15/03/20 |
+----------+----------+----------+
QUERY TWO看起来像这样;
SELECT @day:=DATE_FORMAT((@sDate+ INTERVAL a.i*10000 + b.i*1000 +c.i*100+ d.i*10 + e.i DAY),'%Y/%m/%d') date
FROM ints a
JOIN ints b
JOIN ints c
JOIN ints d
JOIN ints e,(
SELECT @sd:=myDate('2015-01-01 12:00:00'),@myWeek:=0,@sDate:='2015-01-01 12:00:00',@eDate:='2015-03-30 13:30:00') AS dummy
WHERE (a.i*10000 + b.i*1000 + c.i*100 + d.i*10 + e.i<=DATEDIFF(@eDate,@sDate)
ORDER BY 1
查询两个结果
+-----------+
| date |
+-----------+
| 15/01/01 |
+-----------+
| 15/01/02 |
+-----------+
| ........ |
+-----------+
| 15/03/29 |
+-----------+
| 15/03/30 |
+-----------+
我尝试了几个连接,但没有人给我想要的结果(因此我的帖子)。我如何加入这些,以便最终查询给我这个结果:
+-----------+-----------+
| asseti_id | date |
+-----------+-----------+
| 1 | 15/01/01 |
+-----------+-----------+
| 1 | 15/01/02 |
+-----------+-----------+
| 1 | 15/01/03 |
+-----------+-----------+
| 1 | 15/01/04 |
+-----------+-----------+
| 1 | 15/03/16 |
+-----------+-----------+
| 2 | 15/03/17 |
+-----------+-----------+
| 2 | 15/03/18 |
+-----------+-----------+
| 2 | 15/03/19 |
+-----------+-----------+
| 2 | 15/03/20 |
+-----------+-----------+
| 2 | 15/03/21 |
+-----------+-----------+
答案 0 :(得分:0)
尝试此查询
Dictionary<string, string> emailDict = new Dictionary<string, string>(){{"email", ""}};
FB.API( "me?fields=email", Facebook.HttpMethod.GET, FBGetEmail, emailDict);
print ("emailDict " + emailDict.Keys);