SELECT * 
FROM job_postings_fact
LIMIT 100;

SELECT * 
FROM company_dim
LIMIT 100;

SELECT 
        jdf.job_title_short,
        jdf.job_location,
        jdf.job_via,
        cdm.name
FROM job_postings_fact as jdf
JOIN company_dim as cdm
ON jdf.company_id AND cdm.company_id
LIMIT 100;

SELECT COUNT(*)
FROM company_dim
WHERE name = 'CELEBe Korea Co., LTD.';

SELECT
COUNT(company_id)
FROM job_postings_fact
WHERE company_id = 638608;

SELECT 
        jdf.job_title_short,
        jdf.job_location,
        jdf.job_via,
        jdf.company_id,
        cdm.company_id,
        cdm.name AS companyname
FROM job_postings_fact as jdf
LEFT JOIN company_dim as cdm
ON jdf.company_id AND cdm.company_id
LIMIT 10;

SELECT * 
FROM company_dim
LIMIT 10; 

SELECT * 
FROM job_postings_fact
LIMIT 10; 

SELECT 
    jdm.job_id,
    jdm.job_title_short,
    jdm.job_location,
    jdm.job_via,
    cd.company_id,
    cd.name
FROM job_postings_fact as jdm
JOIN company_dim as cd
ON jdm.company_id = cd.company_id
LIMIT 20;


SELECT * FROM skills_job_dim
LIMIT 10;

SELECT * FROM job_postings_fact
LIMIT 20;

SELECT * 
FROM information_schema.tables
WHERE table_catalog='data_jobs';

SELECT * 
FROM information_schema.columns
WHERE table_catalog='data_jobs';


SELECT *
FROM information_schema.columns
WHERE table_catalog = 'data_jobs';


SELECT 
    jdm.*,
FROM job_postings_fact as jdm
LIMIT 10;

SELECT
    sjm.*
FROM skills_job_dim as sjm
LIMIT 10;


-- ////////

SELECT
    sd.*
FROM skills_dim as sd
LIMIT 10;


SELECT 
cd.* 
FROM company_dim as cf;



SELECT 
    jpf.job_id,
    cd.name,
    jpf.job_title_short,
    jpf.job_location,
    jpf.job_country,
    sd.skills,
    sjd.skill_id
FROM job_postings_fact as jpf 
LEFT JOIN skills_job_dim as sjd
    ON jpf.job_id = sjd.job_id
LEFT JOIN skills_dim as sd
    ON sd.skill_id = sd.skill_id
LEFT JOIN company_dim AS cd 
    on jpf.company_id = cd.company_id
ORDER BY RANDOM()
LIMIT 20;