title: SQL: Composite primary key as foreign key
body: <p>I'm creating a database in postgres about NY counties on their education aid amount and criminality rates ranging from 2010 to 2019, these are the two tables</p>
  <pre><code>CREATE TABLE NYAidCrimeTimeSeries 
  (
      County VARCHAR(50),
      Year int,
      AidAmount int,
      Population int,
      JailPopulation int,
      CrimesReported int,
      PRIMARY KEY (County, year)
  )
  
  CREATE TABLE NYAidCrimeMean 
  (
      County VARCHAR(50),
      AidAmount_mean int,
      Population_mean int,
      JailPopulation_mean int,
      CrimesReported_mean int,
      AidPerCap int,
      CrimesPerCap int,
  
      FOREIGN KEY (County) REFERENCES nyaidcrimetimeseries (County)
  )
  </code></pre>
  <p>Would this be possible? Having a composite primary key as a foreign key? If not, what direction should I go try?</p>