Skip to main content

[QRIS] Referrals

Last Updated: 2023-07-21T01:51:08.000Z

QRIS Referrals

Database / Table

Database: seal_cms_v2


Table Name

2023-07-21 08_29_49-Navicat Premium.png


Column Name

qris_referrals

2023-07-21 08_31_21-qris_referrals @seal_cms_v2.png

id -> leave empty (auto fill)

name -> Kode Reff (unique)

user_id -> ID Game Referrer

user_bonus -> Percentage cash bonus for player who top up

ref_bonus -> Percentage (IDR) for referral


**Note:

Please do not change the id, if it's not in order, leave it

If you changed it, it will break the history of referral.

Because it will recorded on qris_logs table which is refer to id column

2023-07-21 08_39_22-qris_logs @seal_cms_v2.png


Getting Referral Total

Go to Navicat and create a query:

2023-07-21 08_43_58-Untitled - Query.png


Query

SELECT q.referral_id, r.name, CONCAT('IDR ', FORMAT(FLOOR(SUM(q.nominal) * r.ref_bonus / 100), 0)) AS ref_bonus_formatted
FROM qris_logs q
JOIN qris_referrals r ON q.referral_id = r.id
WHERE q.referral_id IS NOT NULL
AND q.created_at BETWEEN "2023-06-01 00:00:00" AND "2023-06-30 23:59:59"
GROUP BY q.referral_id, r.`name`
ORDER BY SUM(q.nominal) DESC

Please change the date range for start date and end date


Result for example

2023-07-21 08_48_14-_ Untitled - Query.png


**Note:

All the calculation already reduced with 0.7% MDR from Payment Gateway Provider