Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm:
node v8.17.0
endpoint
share
tweet
const Knex = require('knex'); const knex = Knex({ client: 'mysql' }); knex.select(knex.raw('DATEDIFF("2018-04-15", STR_TO_DATE(birthdate, "%d/%m/%Y")) / 365.25 as age')) .from('user') .orderBy('age', 'desc') .toSQL();
Created from: https://npm.runkit.com/
Loading…
Clone and edit this document