Just multiply one of the numbers by 1.0
:
SELECT something*1.0/total FROM somewhere
That will give you floating point division instead of integer division.
More Related Contents:
- Selecting more than one value
- Is it possible to insert multiple rows at a time in an SQLite database?
- SQLite Reset Primary Key Field
- How do I dump the data of some SQLite3 tables?
- SQLite – How do you join tables from different databases?
- Declare variable in SQLite and use it
- Does SQLite3 not support foreign key constraints?
- Query to get records based on Radius in SQLite?
- How do I add a foreign key to an existing SQLite table?
- How to use SQL Order By statement to sort results case insensitive?
- Division of integers returns 0
- Double colon `::` notation in SQL
- SQL error “ORA-01722: invalid number”
- Sqlite: CURRENT_TIMESTAMP is in GMT, not the timezone of the machine
- Is there AUTO INCREMENT in SQLite?
- Discard millisecond part from timestamp
- Get month from DATETIME in sqlite
- GROUP_CONCAT in SQLite
- How do I cast a string to integer and have 0 in case of error in the cast with PostgreSQL?
- sqlite equivalent of row_number() over ( partition by …?
- Android multiple databases open
- How to convert PostgreSQL 9.4’s jsonb type to float
- sqlite select with condition on date
- How to compare sqlite TIMESTAMP values
- Convert String to Date in MS Access Query
- SQlite: select into?
- SQLite Order By Date1530019888000
- SQL error: misuse of aggregate
- How to use a calculated column by another calculated column
- Copy table structure to new table in sqlite3