0
`statistiques` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`pag_id` INT(11) NULL DEFAULT NULL,
`likes` VARCHAR(45) NULL DEFAULT NULL,
`comments` VARCHAR(45) NULL DEFAULT NULL,
`likepost` VARCHAR(45) NULL DEFAULT NULL,
`posts` VARCHAR(45) NULL DEFAULT NULL,
`talk` VARCHAR(45) NULL DEFAULT NULL,
`char` VARCHAR(50) NULL DEFAULT NULL,
`engagement` VARCHAR(50) NULL DEFAULT '0',
`created` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id`),

and i have data in table i went to do this query for sum chemps in my table

select sum(likes) from statistiques where pag_id in (12,20) and created="2013-12-02" 

but i went have multiple sum like

select sum(likes,posts) from statistiques where pag_id in (12,20) and created="2013-12-02" 

but he isn't worked

English is not my native language, sorry for any mistakes.

0

1 Answer 1

2

Your syntax is wrong. Try

select sum(likes), sum(posts) from ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.