Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Mengambil data Driver yang sudah pernah online
- SELECT `a`.`id`, `a`.`name`, `a`.`username`, `a`.`email`, `a`.`order_type_id`, `a`.`hp` FROM (`users` a) LEFT JOIN `user_meta` b ON `b`.`user_id`=`a`.`id` JOIN (SELECT DISTINCT user_id, username FROM driver_reg_log) as drl ON `a`.`username` = `drl`.`username` WHERE `a`.`user_type_id` = 50 AND `a`.`username` = drl.username GROUP BY `a`.`id`, `a`.`name`, `a`.`username`, `a`.`email`, `a`.`order_type_id`, `a`.`hp` LIMIT 10;
- +------+------------------+----------------------------------+---------------------------+---------------+---------------+
- | id | name | username | email | order_type_id | hp |
- +------+------------------+----------------------------------+---------------------------+---------------+---------------+
- | 594 | wldriver | a5b79d033d2628e956c292469775bfd7 | cress@gmail.com | 0 | +9312345 |
- | 1304 | Ouch Sothon | 6291ad89ec26f1c014bfe23eeccbd96a | ouchsothon.gox@gmail.com | 0 | +85510508763 |
- | 1330 | Lay Lorn | e844f11a45c348ce109dcbe60dd0b745 | 0 | 0 | +85598223229 |
- | 1331 | Norng Sokkun | 45d232667d87210ed8098a52510414e7 | norngsokkun.gox@gmail.com | 0 | +85577711163 |
- | 1348 | Ouk Nith | 1185c3de7d4b2348a4616bdc982755ca | ouknith.gox@gmail.com | 0 | +855719371709 |
- | 1372 | Son Sok | ec08ad870b15dcbc6b49b70c26de7c72 | sonsok.gox@gmail.com | 0 | +85598616684 |
- | 1394 | Driver Sovandara | 7482f5b8049dd9bac105fcd9a6c8ace1 | hsovandara@gmail.com | 0 | +85569811737 |
- | 1414 | Srey Saron | 8898e65ee04376bdbe756a56ffc95a0d | 0 | 0 | +855716996363 |
- | 1549 | BrynDriver01 | 0273251bc73e0603d26fc25d0571d634 | 0 | 0 | +62123123123 |
- | 3784 | C.Chheang Loy | 210e8f04d5c9efdbdb22bd4069b5b0d0 | cheangloy.gox@gmail.com | 0 | +855969921767 |
- +------+------------------+----------------------------------+---------------------------+---------------+---------------+
- 10 rows in set (0.55 sec)
- +----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Query_ID | Duration | Query |
- +----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 1 | 0.51124325 | SELECT count(a.id) as many FROM (`users` a) LEFT JOIN `user_meta` b ON `b`.`user_id`=`a`.`id` JOIN (SELECT DISTINCT user_id, username FROM driver_reg_log) as drl ON `a`.`username` = `drl`.`username` WHERE `a`.`user_type_id` = 50 AND `a`.`username` = drl.username GROUP BY `a`.`id`, `a`.`name`, `a`.`u |
- | 2 | 0.54981225 | SELECT `a`.`id`, `a`.`name`, `a`.`username`, `a`.`email`, `a`.`order_type_id`, `a`.`hp` FROM (`users` a) LEFT JOIN `user_meta` b ON `b`.`user_id`=`a`.`id` JOIN (SELECT DISTINCT user_id, username FROM driver_reg_log) as drl ON `a`.`username` = `drl`.`username` WHERE `a`.`user_type_id` = 50 AND `a`.`u |
- | 3 | 0.54918150 | SELECT `a`.`id`, `a`.`name`, `a`.`username`, `a`.`email`, `a`.`order_type_id`, `a`.`hp` FROM (`users` a) LEFT JOIN `user_meta` b ON `b`.`user_id`=`a`.`id` JOIN (SELECT DISTINCT user_id, username FROM driver_reg_log) as drl ON `a`.`username` = `drl`.`username` WHERE `a`.`user_type_id` = 50 AND `a`.`u |
- +----------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- 3 rows in set, 1 warning (0.00 sec)
- +----------------------+----------+
- | Status | Duration |
- +----------------------+----------+
- | starting | 0.000095 |
- | checking permissions | 0.000004 |
- | checking permissions | 0.000002 |
- | checking permissions | 0.000004 |
- | Opening tables | 0.000017 |
- | init | 0.000058 |
- | System lock | 0.000011 |
- | optimizing | 0.000004 |
- | optimizing | 0.000002 |
- | statistics | 0.000016 |
- | preparing | 0.000011 |
- | Sorting result | 0.000013 |
- | statistics | 0.000037 |
- | preparing | 0.000019 |
- | Creating tmp table | 0.000016 |
- | Sorting result | 0.000005 |
- | executing | 0.000007 |
- | Sending data | 0.000057 |
- | executing | 0.000003 |
- | Sending data | 0.549228 |
- | Creating sort index | 0.000110 |
- | end | 0.000007 |
- | query end | 0.000008 |
- | removing tmp table | 0.000007 |
- | query end | 0.000005 |
- | closing tables | 0.000003 |
- | removing tmp table | 0.000019 |
- | closing tables | 0.000008 |
- | freeing items | 0.000019 |
- | cleaning up | 0.000023 |
- +----------------------+----------+
- 30 rows in set, 1 warning (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement