mardi 13 janvier 2015

SQLite: How to join one-to-many tables?

I have a scenario like below in SQLite: Some items which their prices during time is stored inside price table. Current prices for an item is the one which:



  1. Its Price.fkItemID == Item.id

  2. It is the most recent match (has the maximum ID among those who match in criteria 1)


So how can I join below tables in SQLite such that I have list of items with their current prices?

Besides, having several joins, it will cause too much performance degrade? enter image description here


Aucun commentaire:

Enregistrer un commentaire