title: Need to generate output in the following format year, q1,q2,q3,q4 in the MS SQL server for below data
body: <p>I have a table named acquisition (create table statement and insert statement is share here). I want to add another column to the select statement which will indicate the quarter with year (&quot;2020 q1&quot;) for each row.</p>
  <p><strong>Create table statement:</strong></p>
  <pre><code>CREATE TABLE acquisition (
     id INT PRIMARY KEY IDENTITY,
     company_name VARCHAR(100),
     cost_amount INT NOT NULL,
     acquired_at DATE NOT NULL
  );
  </code></pre>
  <p><strong>Insert statements:</strong></p>
  <pre><code>INSERT INTO acquisition(company_name, cost_amount, acquired_at)
  VALUES
  (1,'HOFA', 6850, '2010-01-17'),
  (2,'POGA', 9256, '2019-09-04'),
  (3,'CUPU', 9329, '2012-08-21'),
  (4,'BULO', 5162, '2020-11-21'),
  (5,'GICE', 5301, '2012-10-04'),
  (6,'TOSE', 1790, '2018-09-30'),
  (7,'POWU', 7183, '2019-05-21'),
  (8,'YEJO', 1491, '2010-12-12'),
  (9,'XAMO', 5974, '2010-03-23'),
  (10,'TEFA', 9456, '2012-06-29'),
  (11,'GOCU', 2469, '2018-04-04'),
  (12,'VOLU', 5478, '2020-02-26'),
  (13,'RISO', 1127, '2020-04-09'),
  (14,'GATI', 8478, '2016-07-31'),
  (15,'DIFA', 2655, '2019-06-12'),
  (16,'VAYA', 7113, '2019-03-19'),
  (17,'KIRE', 6997, '2019-02-17'),
  (18,'MOMU', 9633, '2019-05-21'),
  (19,'ROKU', 2790, '2019-10-30'),
  (20,'KALI', 1969, '2020-07-06'),
  (21,'FIKE', 8104, '2019-12-20'),
  (22,'KULA', 2695, '2016-08-17'),
  (23,'MILE', 5942, '2016-11-02'),
  (24,'BITO', 9578, '2019-01-08');
  </code></pre>
  <p><strong>Sample output:</strong></p>
  <pre><code>| id  | company_name | cost_amount | acquired_at | Quarter |
  | --- | ------------ | ----------- | ----------- | ------- |
  | 1   | HOFA         | 6850        | 2010-01-17  | 2010 Q1 |
  | 2   | POGA         | 9256        | 2019-09-04  | 2019 Q3 |
  | 3   | CUPU         | 9329        | 2012-08-21  | 2012 Q3 |
  | 4   | BULO         | 5162        | 2020-11-21  | 2020 Q4 |
  | 5   | GICE         | 5301        | 2012-10-04  | 2012 Q4 |
  </code></pre>