|
发表于 2023-12-6 15:43:15
|
显示全部楼层
SELECT
`t5`.`wref` AS `wref`,
`t5`.`conqured` AS `conqured`,
`t5`.`name` AS `name`,
`t5`.`username` AS `username`
FROM
(
SELECT
`t2`.`wref` AS `wref`,
`t2`.`conqured` AS `conqured`,
`t3`.`name` AS `name`,
`t4`.`username` AS `username`
FROM
(
(
(
(
SELECT
`t1`.`wref` AS `wref`,
`t1`.`conqured` AS `conqured`,
`t1`.`owner` AS `owner`
FROM
`travian`.`s1_odata` `t1`
WHERE
(`t1`.`conqured` > 0)
GROUP BY
`t1`.`wref`,
`t1`.`conqured`,
`t1`.`owner`
)
) `t2`
LEFT JOIN `travian`.`s1_vdata` `t3`
ON
((`t2`.`conqured` = `t3`.`wref`))
)
LEFT JOIN `travian`.`s1_users` `t4`
ON
((`t2`.`owner` = `t4`.`id`))
)
) `t5`
WHERE
(
ISNULL(`t5`.`name`) OR ISNULL(`t5`.`username`)
) |
|