Skip to content

Instantly share code, notes, and snippets.

@irzhywau
Last active December 26, 2018 07:25
Show Gist options
  • Save irzhywau/8fc399d487777ea311335732edcbb2f4 to your computer and use it in GitHub Desktop.
Save irzhywau/8fc399d487777ea311335732edcbb2f4 to your computer and use it in GitHub Desktop.
SQL 2 Tables
# ohatra
# table_1 (id, field_11, field_12)
# table_2 (id, field_21, field_22)
# de field_11 <-> field_21 ohatra
# eo amreo field 2 reo ohatra no misy ny liaison amle table 2
# de ohatra (field_12 x field_22) no tiana ho azo
select (t1.field_12 * t2.field_22) as `produit` from table_1 t1
inner join table_2 t2 on t2.field_21 = t1.field_11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment