Skip to content

Conversation

@safierinx-a
Copy link

No description provided.

@h9lk
Copy link

h9lk commented Jul 14, 2021

@safierinx-a @jisaw
Wrong approach to solving problem if you intend use Round - in this case, even with 0, you will get 0 after decimal point.

Your solution will look like this:

name %
Albania 3.000000000000%
Andorra 0.000000000000%

you need use query like this to get correct values:

Select name, 
Concat(Cast(100*population/(Select population From world Where name='Germany') as decimal (3,0)), '%')
From world
Where continent = 'Europe'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants