-1
I created this table:
CREATE TABLE `Populacao` (
`ano` int(11) NOT NULL,
`pais` varchar(2) NOT NULL,
`popM` varchar(10) DEFAULT NULL,
`popF` varchar(10) DEFAULT NULL,
);
Where popM is the male population and popF is the female population.
I’m trying to find out (query) which country had the largest total population in each year.
Nota 1: População total = popF + popM
Nota 2: popM e popF são campos 'varchar'
Which version of Mysql are you using? There is the possibility to change popM and popF columns to integer or some numeric type?
– imex
What values your system is sending to popM and popF columns ?
– RXSD
Mysql 5. No, I want to keep popM and popF varchar.
– Alcachofra
Send "83456765", for example. Numerical values, but in varchar.
– Alcachofra