Simple SQL task, Import CSV file into mysql and write query.

Job ID: 31224178

Budget: $10 – $30 AUD

USE the attached CSV file.
TASKS:
-- 1) Query by which you could extract active clients at the 2013-06-19.

-- 2) How many clients were activated and deactivated during June of 2013. Please provide
both numbers as a result of one query.

-- 3) How many active clients had more than one SIM card on 2013-06-19. Unique client
could be identified by using unique device information (prepaid customers are usually not
identified in the systems).

-- 4) Select currently active clients and pick up TOP5 device brands by each phone type.
Please provide the result in one single query.

-- 5) Request is to provide a new column for currently active clients. New column should have
the value of IMEI if the client is the first who used this IMEI (you can check by the client activation date). If the client is not the first one, then column value should be 'Multi SIM'.

-- 6) Rebuild the table into an IMEI history query where you could track the history of the
reuse of the device. This table/query should have the columns:
-- imei
-- msisdn
-- device_brand
-- device_model
-- imei_eff_dt - the date when msisdn is used with the IMEI
-- imei_end_dt - the date when new other msisdn reused the phone.
Related categories: PHP SQL MySQL Database Programming Microsoft SQL Server