Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Database used | |
use Credit_card_fraud | |
-- To check column names for reference | |
declare @collist nvarchar(max); | |
select @collist = STRING_AGG(COLUMN_NAME,',') | |
from INFORMATION_SCHEMA.COLUMNS | |
where TABLE_NAME = 'fraudTrain'; | |
print @collist |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- country based overall data | |
SELECT location, max(population) as total_population, max(total_cases) as total_confirmed_cases,max(total_deaths) as total_deaths, max(total_cases/population)*100 as percent_infected | |
FROM `my-project-vidal.covid19.case_data` | |
where continent is not null | |
group by location | |
order by percent_infected desc | |
--continent based overall data | |
select continent, max(population) as population, max(total_cases)as total_cases,max(total_deaths) as total_death | |
FROM `my-project-vidal.covid19.case_data` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use My_tasks | |
-- exec sp_rename 'coffe_shop_sales' ,'coffee_shop_sales'; | |
--making a copy of od original table to do our cleaning & analysis just in case | |
select * | |
into copy_coffee_shop_sales | |
from dbo.coffee_shop_sales | |
-- verify the table creation | |
select * from copy_coffee_shop_sales order by transaction_id; |