From surenkid, 5 Months ago, written in MySQL.
Embed
  1. SELECT * FROM wfx_vip WHERE id IN (
  2.         SELECT DISTINCT vipid FROM wfx_shop_order WHERE ispay = 1 AND format(totalprice,2) = 29.9
  3.         AND vipid IN (SELECT id FROM wfx_vip WHERE pid = (SELECT id FROM wfx_vip
  4.         WHERE mobile = '17606258240'
  5.         LIMIT 1))
  6. )