Dmitri
Dmitri

Reputation: 2467

MySQL complex query

Hello stackoverflow community!

I'm having trouble creating a mysql query.

I have 2 tables:

1) vehicles(engine_id)

2) engines(id, power)

I need to select all the vehicles, whose engine's power is > than some value. Could you please help me with that ? Thank you!

Upvotes: 0

Views: 83

Answers (1)

Stefan H
Stefan H

Reputation: 6683

    SELECT *
      FROM Vehicles
INNER JOIN Engines On Vehicles.engine_id = engines.id
     WHERE Engines.power > yourValues

Upvotes: 1

Related Questions