statement to find at least a year with register users > 1 i need to find find the years for which have at least 2 users register.

the table is 

CREATE TABLE IF NOT EXISTS `rotef`.`users` (
  `id` INT(11) NULL,
  `name` VARCHAR(100) NULL,
  `year` INT(11) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


and the data 

INSERT INTO `rotef`.`users` (`id`, `name`,`year`) VALUES (1,"john", 2016);
INSERT INTO `rotef`.`users` (`id`, `name`,`year`) VALUES (2,"jim", 2016);
INSERT INTO `rotef`.`users` (`id`, `name`,`year`) VALUES (3,"eric", 2014);
INSERT INTO `rotef`.`users` (`id`, `name`,`year`) VALUES (4,"jesi", 2012);
INSERT INTO `rotef`.`users` (`id`, `name`,`year`) VALUES (5,"jef", 2011);


the statement based on the above data must return 2016
You need to GROUP BY year, and use a HAVING clause to further limit only the grups where the count or rows (count(*)) is greater than 1:

SELECT
    year
FROM
    users
GROUP BY
    year
HAVING
    count(*) &gt; 1
ORDER BY
    year ;


You get:

| year |
|------|
| 2016 |


You can check it at SQLFiddle