title: Batch upsert query for batch update in Apache Phoenix
body: <p>I am currently using following query for batch update on  Phoenix. Is there any other way to do it better? It takes 0.071 seconds to execute.</p>
  
  <p>Take a look at following working query:
  Consider a table XYZ with columns ID,CF.RISK;</p>
  
  <p><code>
  UPSERT INTO XYZ (
      ID,
      CF.RISK
      SELECT ID,
          (CASE ID
              WHEN '12341e65-a68b-4f88-93ce-33dd94497a6d' THEN 'MEDIUM_RISK'
              WHEN '73f41e65-a68b-4f88-93ce-33dd94497a6d' THEN 'HIGH_RISK'
              ELSE 'LOW_RISK'
          END)
        FROM ACCOUNTS
          WHERE ID IN(
                  '12341e65-a68b-4f88-93ce-33dd94497a6d',
                  '73f41e65-a68b-4f88-93ce-33dd94497a6d')
  </code></p>
  
  <p>It updates column CF.RISK for all ID's in WHERE clause list.</p>