CREATE TABLE IF NOT EXISTS `app_event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) NOT NULL DEFAULT '0',
INSERT INTO `app_event` (`id`, `category_id`) VALUES
(90, 21),
(91, 21),
(93, 21);
CREATE TABLE IF NOT EXISTS `app_event_book` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`start_date` date NOT NULL,
`event_id` int(11) NOT NULL DEFAULT '0',
INSERT INTO `app_event_book` (`id`, `start_date`, 'event_id') VALUES
(10, 2020-08-06, 90),
(11, 2020-08-06, 90),
(12, 2020-08-06, 91);
(16, 2020-08-06, 91),
(20, 2020-08-06, 91),
(22, 2020-08-06, 93);
per la somma devo ottenere il numero totale degli id della tabella app_event_book, che in questo caso sono 6