SELECT `i1`.`i`, `i1`.`o`, `i2`.`i`, `i2`.`o`,
(IF(`i1`.`o` > `i2`.`o`, `i2`.`o`, `i1`.`o`)
- IF(`i1`.`i` > `i2`.`i`, `i1`.`i`, `i2`.`i`)) AS `crosstime`
FROM `table` AS `i1`
JOIN `table` AS `i2` ON `i2`.`id` > `i1`.`id`
AND `i1`.`i` < `i2`.`o` AND `i2`.`i` < `i1`.`o`
declaration-list
: S* declaration? [ ';' S* declaration? ]*
;
ST_CONTAINS(`area`, PointFromText(CONCAT('POINT(', :latitude, ' ', :longitude, ')')));
The following comparison operators and functions are not yet supported with JSON values:
BETWEEN
IN()
GREATEST()
LEAST()