mysql - Need to calculate the age of horses -


in sql, need calculate age of horses have died, multiply 3 human age.

there column called 'born' , column called 'passed', containing year died.

so need calculate age of horses born column (year born) passed column (year passed away) there age, multiply number three. need list horse_id, name, , age in human years, know how select statement myself.

try code,

select horse_id, name, ((passed-born) * 3) humanage horses passed not null; 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -