SELECT words.id, words.definition FROM words JOIN types ON words.typeID = types.id AND types.name = ? JOIN stockmatch ON words.id = stockmatch.wordID JOIN stock ON stockmatch.stockID = stock.id AND stock.word = ? JOIN languages ON stock.languageID = languages.id AND languages.name = ?