two tables are there one starrating and one paidmember table.
| ID | paid |
| 1 | 1 |
| 2 | 1 |
| 3 | 0 |
| 4 | 1 |
| 5 | 1 |
| 6 | 1 |
| ID | star |
| 1 | 6 |
| 2 | 6 |
| 3 | 6 |
| 4 | 5 |
| 5 | 6 |
| 6 | 3 |
if star will be 6 and paid=1 it shows first if paid=0 and rating 6 it show last then check the star 5 same logic
| ID | paid |
| 1 | 1 |
| 2 | 1 |
| 3 | 0 |
| 4 | 1 |
| 5 | 1 |
| 6 | 1 |
| ID | star |
| 1 | 6 |
| 2 | 6 |
| 3 | 6 |
| 4 | 5 |
| 5 | 6 |
| 6 | 3 |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nitin SontakkeRank #264 · 9.6K reputationPosted May 20, 2018, 11:20 PM EDT
Pooja ChowdhuryRank #3,615 · 403 reputationPosted May 20, 2018, 11:25 PM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted May 20, 2018, 11:45 PM EDT
Jayesh VaghasiyaRank #9,790 · 202 reputationPosted Aug 6, 2018, 3:15 AM EDT