title: Trying to format SQL data into my html page
body: <p>I'm just learning SQL, and I was wondering if it's even possible to do this. The data output I have looks like this: </p>
  
  <p><a href="https://i.stack.imgur.com/t20nE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t20nE.png" alt="enter image description here"></a></p>
  
  <p>in the DB it <strong>doesn't have</strong> a col named ZUM Tool Groups, and I was wondering if it's possible to assign the SQL output to include the first column.</p>
  
  <p>Example: when the query outputs <strong>CV403 PROD 88</strong> to include ARC_SOUTH  on the Left hand side (note picture below).</p>
  
  <p><a href="https://i.stack.imgur.com/IuP6P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IuP6P.png" alt="enter image description here"></a></p>
  
  <p>is this possible? <strong>Note:</strong> I can't edit this table in the DB to include the first column so I am looking for a second solution. Thank you in advance!</p>
  
  <p>Here is the SQL query I have.</p>
  
  <pre><code>Select 
         g.entity as MISTI,
         t.cur_state      as STATE,
         ROUND(((SYSDATE-t.cur_state_dttm)*24),2) AS HRS
  
  From Entity_Grp_Lst g
  left outer join trk_id_def t
  on g.facility = t.facility
  and g.grp_type = t.grp_type
  and g.entity=t.entity
  and g.grp_type = '720'
  WHERE t.cur_state NOT IN ('PROD','NM','TERM','NULL','IDLE', 'YER', 'I05', 'I07')
  and Entity_Grp_type = '041'
  and g.ENTITY_GRP in ('THINFILM')
  and (g.entity like 'CV403%' or
  g.entity like 'CV406%' or
  g.entity like 'CV405%' or
  g.entity like 'CV132%' or
  g.entity like 'MT105%' or
  g.entity like 'MT106%' or
  g.entity like 'MT117%' or
  g.entity like 'MT118%' or
  g.entity like 'MTA08%' or
  g.entity like 'MTA13%' or
  g.entity like 'MTA09%' or
  g.entity like 'MTA30%' or
  g.entity like 'MTA31%' or
  g.entity like 'MTA32%' or
  g.entity like 'MTA33%' or
  g.entity like 'MTA34%' or
  g.entity like 'CEN01%' or
  g.entity like 'CEN02%' or
  g.entity like 'CEN03%' or
  g.entity like 'CVN31%' or
  g.entity like 'MTA12%' or
  g.entity like 'MTA14%' or
  g.entity like 'MTA21%' or
  g.entity like 'MTA22%' or
  g.entity like 'CVN13%' or
  g.entity like 'CVN14%' or
  g.entity like 'CVN32%' or
  g.entity like 'CVA40%' or
  g.entity like 'CVA41%' or
  g.entity like 'MTA40%' or
  g.entity like 'MTA43%' or
  g.entity like 'MTT01%' or
  g.entity like 'CVN02%' or
  g.entity like 'CVN03%' or
  g.entity like 'VN05%' or
  g.entity like 'CV170%' or
  g.entity like 'CV172%' or
  g.entity like 'CV173%' or
  g.entity like 'CV174%' or
  g.entity like 'CV175%' or
  g.entity like 'CV176%' or
  g.entity like 'CV177%' or
  g.entity like 'CV178%' or
  g.entity like 'CV179%' or
  g.entity like 'MT130%' or
  g.entity like 'MT131%' or
  g.entity like 'MT132%' or
  g.entity like 'MT133%' or
  g.entity like 'MT134%' or
  g.entity like 'MT135%' or
  g.entity like 'MT136%' or
  g.entity like 'MT137%' or
  g.entity like 'MT138%' or
  g.entity like 'MT139%' or
  g.entity like 'MT140%' or
  g.entity like 'MT141%' or
  g.entity like 'MT142%' or
  g.entity like 'MT143%' or
  g.entity like 'MTA04%' or
  g.entity like 'MTA05%' or
  g.entity like 'MTA10%' or
  g.entity like 'MT102%' or
  g.entity like 'MT119%' or
  g.entity like 'MT120%' or
  g.entity like 'MT121%' or
  g.entity like 'MT122%' or
  g.entity like 'MT123%' or
  g.entity like 'MT103%' or
  g.entity like 'MT104%' or
  g.entity like 'MT107%' or
  g.entity like 'MT108%' or
  g.entity like 'MT109%' or
  g.entity like 'MT110%' or
  g.entity like 'MT111%' or
  g.entity like 'MT112%' or
  g.entity like 'MT113%' or
  g.entity like 'MT114%' or
  g.entity like 'MT115%' or
  g.entity like 'MT116%' or
  g.entity like 'MTA07%' or
  g.entity like 'MTV01%' or
  g.entity like 'TA41%' or
  g.entity like 'MTA42%' or
  g.entity like 'CV420%' or
  g.entity like 'CV208%' or
  g.entity like 'CV404%' or
  g.entity like 'CV421%' or
  g.entity like 'CVN12%' or
  g.entity like 'CVN16%' or
  g.entity like 'CVN18%' or
  g.entity like 'CVN15%' or
  g.entity like 'CVN17%' or
  g.entity like 'CVN01%' or
  g.entity like 'CVA81%' or
  g.entity like 'CVA82%' or
  g.entity like 'CV131%' or
  g.entity like 'CV133%' or
  g.entity like 'CV134%' or
  g.entity like 'CV135%' or
  g.entity like 'CV136%' or
  g.entity like 'CVA04%' or
  g.entity like 'CVN04%' or
  g.entity like 'CVN06%' or
  g.entity like 'CV203%' or
  g.entity like 'CV204%' or
  g.entity like 'CV205%' or
  g.entity like 'CV206%' or
  g.entity like 'CV207%' or
  g.entity like 'CV209%' or
  g.entity like 'CV210%' or
  g.entity like 'CV211%' or
  g.entity like 'CV213%' or
  g.entity like 'CV214%' or
  g.entity like 'CV317%' or
  g.entity like 'CVN10%' or
  g.entity like 'CVN11%' or
  g.entity like 'CVN19%' or
  g.entity like 'CV310%' or
  g.entity like 'CV310%' or
  g.entity like 'CV312%' or
  g.entity like 'CV313%' or
  g.entity like 'CV314%' or
  g.entity like 'CV315%' or
  g.entity like 'CV311%' or
  g.entity like 'CV316%' or
  g.entity like 'CV318%' or
  g.entity like 'CVA50%' or
  g.entity like 'CVN21%' or
  g.entity like 'CVN22%' or
  g.entity like 'CV505%' or
  g.entity like 'CV508%' or
  g.entity like 'CV509%' or
  g.entity like 'CV510%' or
  g.entity like 'CV512%' or
  g.entity like 'CV520%' or
  g.entity like 'CV521%' or
  g.entity like 'CV522%' or
  g.entity like 'CV104%' or
  g.entity like 'CV105%' )
  
  AND ROUND(((SYSDATE-t.cur_state_dttm)*24),2) &gt; 48  
  order by t.cur_state_DTTM desc
  
  
  ";
  </code></pre>