dimanche 12 novembre 2017

Subtract two columns of in ruby

I Have a table Users

id Name offered used 1 John 10 8 2 michel 2 2

Sql Query

select offered-used from Users where id=1

result = 2

I required the same query in ruby

Aucun commentaire:

Enregistrer un commentaire