title: generate serial number in decreasing order given a variable in netezza aginity sql
body: <p>Is there any SQL syntax using netezza SQL, given column number, trying to generate rows for number in decreasing order down to 0.</p>
  <p>Below is an example of what I'm trying to do</p>
  <p>BEFORE</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>NUMBER</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>4</td>
  </tr>
  <tr>
  <td>B</td>
  <td>5</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>AFTER</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>NUMBER</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>4</td>
  </tr>
  <tr>
  <td>A</td>
  <td>3</td>
  </tr>
  <tr>
  <td>A</td>
  <td>2</td>
  </tr>
  <tr>
  <td>A</td>
  <td>1</td>
  </tr>
  <tr>
  <td>B</td>
  <td>5</td>
  </tr>
  <tr>
  <td>B</td>
  <td>4</td>
  </tr>
  <tr>
  <td>B</td>
  <td>3</td>
  </tr>
  <tr>
  <td>B</td>
  <td>2</td>
  </tr>
  <tr>
  <td>B</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>please also click to see <a href="https://i.stack.imgur.com/OFKY7.png" rel="nofollow noreferrer">screenshot</a> for example thanks</p>