select * from sender_ids where senderid like '%am%';

select * from mno_world_wide where country like '%afghan%';

select count(*) as aggregate from `clients` inner join `auth_users` on `auth_users`.`id` = `vpn_configs`.`user_id` inner join `network_operators` on `network_operators`.`id` = `vpn_configs`.`mno_id` where vpn_configs.vpn_device like '%xi%' OR network_operators.country like '%xi%' OR vpn_configs.remote_peer_ip like '%xi%' OR vpn_configs.local_access_control_list like '%xi%' OR vpn_configs.partner_access_control_list '%xi%');


--  "message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vpn_configs.vpn_device vpn_device' in 'WHERE' (SQL: 
 
 select count(*) as aggregate from `clients` inner join `auth_users` on `auth_users`.`id` = `vpn_configs`.`user_id` inner join `network_operators` on `network_operators`.`id` = `vpn_configs`.`mno_id` where vpn_configs.vpn_device LIKE '%xi%' OR network_operators.country LIKE '%xi%' OR vpn_configs.remote_peer_ip LIKE '%xi%' OR vpn_configs.local_access_control_list like '%xi%' OR vpn_configs.partner_access_control_list LIKE '%xi%';
 

SELECT * FROM ussd_menus_dealers WHERE stage = '5' AND level = 'new_merchant_language' AND menu_language =
'english' AND remarks = 'standard' LIMIT 1;


SELECT * FROM ussd_menus_dealers WHERE stage = '5' AND level = 'new_merchant_confirm' AND menu_language =
'english' AND remarks = 'standard' LIMIT 1;



select id, name, progress_indicator,onboarding_progress_stage, progress_indicator_score from clients;

select stage_id from client_onboarding_progress where status = 'PENDING' and client_id = 3 order by stage_id limit 1;

SELECT WEEK(NOW()) AS Current_Week;

select * from clients where week(created_at) = WEEK(NOW());
update clients set progress_indicator = 'Agreement Stage' where id > 4;
-- {"Agreement Stage":"PENDING","Interconnectional (Bilateral)":"PENDING","Rate Card Sharing":"PENDING","Rates Uploaded":"PENDING","Tests Completed":"PENDING"}
-- {"Agreement Stage":"PENDING","Interconnectional (Bilateral)":"PENDING","Tests Completed":"PENDING","Rate Card Sharing":"PENDING","Rates Uploaded":"PENDING"}

update clients set onboarding_progress_stage = '{"Agreement Stage":"PENDING","Interconnectional (Bilateral)":"PENDING","Rate Card Sharing":"PENDING","Rates Uploaded":"PENDING","Tests Completed":"PENDING"}' where id > 4;
update clients 
	set progress_indicator = 'COMPLETED',
	set onboarding_progress_stage = '{"Agreement Stage":"PENDING","Interconnectional (Bilateral)":"PENDING","Tests Completed":"PENDING","Rate Card Sharing":"PENDING","Rates Uploaded":"PENDING"}',
	set progress_indicator_score = 100
	where id = 24;


