Mysql 连接中的结果为空

Mysql 连接中的结果为空,mysql,left-join,Mysql,Left Join,我在mysql查询中遇到以下问题: SELECT t2.ordering, t1.family, t1.type, t1.game FROM (SELECT landbased_results.game, landbased_results.type, landbased_results.family FROM landbased_results Group by family, type,game) t1 LEFT JOIN (SELECT family,

我在mysql查询中遇到以下问题:

SELECT t2.ordering, t1.family, t1.type, t1.game 
FROM (SELECT 
    landbased_results.game, 
    landbased_results.type, 
    landbased_results.family 
FROM landbased_results 
Group by family, type,game) t1 
LEFT JOIN
(SELECT family, ordering FROM family_order) t2 
ON t1.family = t2.family 
ORDER BY t2.ordering, t1.family, t1.type, t1.game ASC
给我以下结果:

+----------+--------------+-------------+---------+
| ordering | family       | type        | game    |
+----------+--------------+-------------+---------+
| NULL     | Punto  Banco | Punto Banco | PB 1    |
| NULL     | Punto  Banco | Punto Banco | PB 2    |
| NULL     | Punto  Banco | Punto Banco | PB 3    |
| 1        | Roulette     | Canasta     | CA 1    |
| 1        | Roulette     | Canasta     | CA 2    |
| 1        | Roulette     | Canasta     | CA 3    |
| 1        | Roulette     | Canasta     | CA 4    |
| 2        | Blackjack    | Rummy       | RUM 1   |
| 2        | Blackjack    | Rummy       | RUM 2   |
| 2        | Blackjack    | Rummy       | RUM 3   |
| 2        | Blackjack    | Rummy       | RUM 4   |
| 2        | Blackjack    | Rummy       | RUM 5   |
| 4        | Multi-games  | Multi-games | MULTI 1 |
| 4        | Multi-games  | Multi-games | MULTI 2 |
| 4        | Multi-games  | Multi-games | MULTI 3 |
| 5        | Pokers       | Pai Go      | PG 1    |
| 5        | Pokers       | Pai Go      | PG 2    |
| 5        | Pokers       | Poker       | PK 1    |
| 5        | Pokers       | Texas       | TEXAS 1 |
| 5        | Pokers       | Texas       | TEXAS 2 |
| 5        | Pokers       | Texas       | TEXAS 3 |
| 5        | Pokers       | Tute        | TUTE 1  |
| 7        | Craps        | Craps       | CR 1    |
| 8        | Slots        | Slots       | Slots   |
+----------+--------------+-------------+---------+
为什么在“排序”中得到空结果?该表有一个清晰的排序键:

+----+-------------+----------+
| id | family      | ordering |
+----+-------------+----------+
| 1  | Blackjack   | 2        |
| 2  | Craps       | 7        |
| 3  | Multi-games | 4        |
| 4  | Pokers      | 5        |
| 5  | Punto Banco | 3        |
| 6  | Roulette    | 1        |
| 7  | Slots       | 8        |
| 8  | Super Pic   | 6        |
+----+-------------+----------+

我做错了什么???

结果中的
Punto银行
Punto
Banco
之间有两个空格。它看起来像是基于土地的结果。家庭有两个空格和家庭顺序。家庭只有一个空格。这使得它们彼此不相等,因此连接没有连接它们。看起来你是对的!谢谢结果中的
Punto Banco
Punto
Banco
之间有两个空格。它看起来像是基于土地的结果。家庭有两个空格和家庭顺序。家庭只有一个空格。这使得它们彼此不相等,因此连接没有连接它们。看起来你是对的!谢谢