I am trying to figure out the trend of patent applications for a certain NACE category through the years, from 1970 to 2020.
I would like to see the number of patent applications for NACE 21.00 (pharmaceuticals), and I want to count 1 for each patent, regardless of the number of countries in which the patent is portected (member of the patent family), and, as I know that there is the wage of NACE to take into account, I planned to repeat my query per scenario, that is changing the wage in each serach.
For simplicity, I wrote the query for the time span 2000-2020, and is:
Code: Select all
SELECT
COUNT(distinct(case when a.appln_filing_year = 2000 then a.appln_id end)) as '2000',
COUNT(distinct(case when a.appln_filing_year = 2001 then a.appln_id end)) as '2001',
COUNT(distinct(case when a.appln_filing_year = 2002 then a.appln_id end)) as '2002',
COUNT(distinct(case when a.appln_filing_year = 2003 then a.appln_id end)) as '2003',
COUNT(distinct(case when a.appln_filing_year = 2004 then a.appln_id end)) as '2004',
COUNT(distinct(case when a.appln_filing_year = 2005 then a.appln_id end)) as '2005',
COUNT(distinct(case when a.appln_filing_year = 2006 then a.appln_id end)) as '2006',
COUNT(distinct(case when a.appln_filing_year = 2007 then a.appln_id end)) as '2007',
COUNT(distinct(case when a.appln_filing_year = 2008 then a.appln_id end)) as '2008',
COUNT(distinct(case when a.appln_filing_year = 2009 then a.appln_id end)) as '2009',
COUNT(distinct(case when a.appln_filing_year = 2010 then a.appln_id end)) as '2010',
COUNT(distinct(case when a.appln_filing_year = 2011 then a.appln_id end)) as '2011',
COUNT(distinct(case when a.appln_filing_year = 2012 then a.appln_id end)) as '2012',
COUNT(distinct(case when a.appln_filing_year = 2013 then a.appln_id end)) as '2013',
COUNT(distinct(case when a.appln_filing_year = 2014 then a.appln_id end)) as '2014',
COUNT(distinct(case when a.appln_filing_year = 2015 then a.appln_id end)) as '2015',
COUNT(distinct(case when a.appln_filing_year = 2016 then a.appln_id end)) as '2016',
COUNT(distinct(case when a.appln_filing_year = 2017 then a.appln_id end)) as '2017',
COUNT(distinct(case when a.appln_filing_year = 2018 then a.appln_id end)) as '2018',
COUNT(distinct(case when a.appln_filing_year = 2019 then a.appln_id end)) as '2019',
COUNT(distinct(case when a.appln_filing_year = 2020 then a.appln_id end)) as '2020'
FROM tls201_appln a
join tls229_appln_nace2 n on a.appln_id = n.appln_id
WHERE
a.appln_id < 900000000 -- exclude artificial applications
AND n.nace2_code like '21.00'
AND n.weight >= 0.25 --Will change for each scenario
Thank you so much for tour help.
Best regards,
Elisa