[Question] SQL Division

Question: You have written the query below, using the attached user_summary table. The fourth column of your output is supposed to show the percent active users (which is the second column divided by the third column)

select
  platform
  , active_users
  , total_users
  , active_users / total_users as percent_active_users
from
  user_summary

However, the division returns 0 for all rows. Looking at columns 2 and 3 this should not be the case.

 

How can we correct this?


Ready for the solution? Click here!

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 3 mths agoLast active
  • 152Views
  • 1 Following