Select count without join I'm using MySQL. I have three tables, and in every table, I have a time column.

With a single query I want to count the number of rows that are between two given dates.

I have no need with a connection between the tables (although they are related), so join is not necessary.

Is it possible?

Failed attempt #1

SELECT
  COUNT(a.time),
  COUNT(b.time),
  COUNT(c.time)
FROM
  tbl1 AS a,
  tbl2 AS b,
  tbl3 AS c
WHERE
  a.time BETWEEN '2018-03-07 18:32:55' AND '2018-03-07 20:46:55'
AND
  b.time BETWEEN '2018-03-07 18:32:55' AND '2018-03-07 18:46:55'
AND
  c.time BETWEEN '2018-03-07 18:32:55' AND '2018-03-07 18:46:55' ;
This would probably need to be a UNION query, as in:

SELECT 'a'
  , COUNT(a.time)
FROM
  tbl1 AS a
WHERE
  a.time BETWEEN '2018-03-07 18:32:55' AND '2018-03-07 20:46:55' 

UNION ALL

SELECT 'b'
  , COUNT(b.time)
FROM
  tbl2 AS b
WHERE
  b.time BETWEEN '2018-03-07 18:32:55' AND '2018-03-07 20:46:55' 

UNION ALL

SELECT 'c'
  , COUNT(c.time)
FROM
  tbl3 AS c
WHERE
  c.time BETWEEN '2018-03-07 18:32:55' AND '2018-03-07 20:46:55' 


The output would look like:

╔══════╦══════╗
║ col1 ║ col2 ║
╠══════╬══════╣
║ a    ║   10 ║
║ b    ║    3 ║
║ c    ║   14 ║
╚══════╩══════╝