Answer the question
In order to leave comments, you need to log in
How to get the sum of certain fields from the database?
I have this table
create_table "orders", force: :cascade do |t|
t.bigint "user_id"
t.bigint "store_id"
t.string "recipient_adress"
t.string "sender_coordinates", default: [], array: true
t.string "recipient_coordinates", default: [], array: true
t.datetime "created_at"
t.boolean "rendition", default: false
t.float "shipping"
t.float "total_price"
t.index ["store_id"], name: "index_orders_on_store_id"
t.index ["user_id"], name: "index_orders_on_user_id"
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question