Qatar’s male-to-female population ratio is 2.5 to 1.0, one of the highest in the world. This skew is due to its heavy reliance on migrant laborers, who are predominantly male and work construction jobs. As you can see from the chart, the skew is especially pronounced among working-age adults. The ratio is roughly even in younger age brackets, where the native Qatari population plays a larger role.
The UN defines “total population” as anyone living in a country at a given time. This includes citizens, refugees, migrants, and temporary workers, but it doesn’t include those passing by for noneconomic reasons, like tourists. (This is similar to the US Census Bureau’s definition of “resident population.”) While Qatar doesn’t release official data on the nationality of its migrant workers, large numbers come from Southern Asia (e.g., India, Nepal, Bangladesh).