Skip to content

Analyzing unicorn company data
Analyzing unicorn company data
In this workspace, we'll be exploring the relationship between total funding a company receives and its valuation.
print('Hello world!')
Current Type: Bar
Current X-axis: None
Current Y-axis: None
Current Color: None
DataFrameas
df
variable
-- Select the product details, quantity, and location of bicycles in stock
SELECT product_name,
category_name,
list_price,
quantity,
store_id
FROM products
INNER JOIN stocks
ON products.product_id = stocks.product_id
INNER JOIN categories
ON products.category_id = categories.category_id
ORDER BY product_name
Legal, gostei! Com SQL, perfeito
df
Current Type: Bar
Current X-axis: store_id
Current Y-axis: quantity
Current Color: category_name
Bike Business
DataFrameas
df
variable
select *
from companies c
join funding f
on f.company_id = c.company_id
DataFrameas
df
variable
select
company
, funding
, valuation
from companies c
join funding f
on f.company_id = c.company_id
Current Type: Line
Current X-axis: funding
Current Y-axis: valuation
Current Color: None
DataFrameas
df
variable
select
company
, funding / 10^6 funding
, valuation / 10^6 valuation
from companies c
join funding f
on f.company_id = c.company_id
DataFrameas
df
variable
select
company
, round(funding / 10^8) * 10^(-1) funding_in_billions
, round(valuation / 10^9) valuation_in_billions
from companies c
join funding f
on f.company_id = c.company_id
order by valuation desc
limit 20
DataFrameas
df
variable
select
company
, round(funding / 10^6) funding_in_millions
, round(valuation / 10^9) valuation_in_billions
, valuation / nullif(funding, 0) valuation_to_funding
from companies c
join funding f
on f.company_id = c.company_id
order by case when valuation / nullif(funding, 0) is null then 0 else valuation / nullif(funding, 0) end desc
DataFrameas
df
variable
select * from companies inner join funding using(company_id)
import plotly.express as px
px.scatter(df, x='funding', y='valuation')