title: Select with un-standard Group by in clause
body: <p>sorry if I reinventing the wheel (and for my English too), and maybe is not possible with plain vanilla query but I have "nonsence Idea" that is possible move block of Rows to Resulsets top, I hope that this SQL dump (MySql) and for better undestood I converted that to the Account and its Currency, maybe these would be better to ilustrate what I trying, really clause Group by with Order by not my cup of java </p>
  
  <pre><code>DROP TABLE IF EXISTS `account`;
  
  CREATE TABLE `account` (
    `idAccount` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `idCustomer` int(10) unsigned DEFAULT NULL,
    `idCustomerNumber` varchar(6) DEFAULT NULL,
    `AccountNumber` varchar(12) DEFAULT NULL,
    `Currency` varchar(3) DEFAULT NULL,
    PRIMARY KEY (`idAccount`)
  ) 
  
  INSERT INTO `account` (`idAccount`,`idCustomer`,`idCustomerNumber`,`AccountNumber`,`Currency`) VALUES 
   (1,1,'000001','000001JPY101','JPY'),
   (2,1,'100002','100002GBP101','GBP'),
   (3,2,'003333','003333EUR201','EUR'),
   (4,1,'100002','100002GBP102','GBP'),
   (5,1,'000001','000001EUR101','EUR'),
   (6,1,'000001','000001USD101','USD'),
   (7,1,'000001','000001USD102','USD'),
   (8,1,'100002','100002EUR101','EUR'),
   (9,1,'100002','100002USD101','USD'),
   (10,2,'003333','003333EUR202','EUR'),
   (11,2,'003333','003333JPY201','JPY');
  </code></pre>
  
  <p>(<code>Select * From Account Where CustomerNumber = '000001'</code>)</p>
  
  <p>EDIT: now I hope that would be better ...</p>
  
  <p>how can I create Select from table with Group by Currenncy and Order by AccountNumber, and with possibility to create Resultset starts with for example AccountNumbers with USD currency, rest of rows would be alphabetically grouped by currency and ordered by AccountNumber </p>
  
  <p>to extract a rows that would be sorted with follows order USD - EUR - JPY</p>
  
  <p>Edit 2: </p>
  
  <p>my bad, sorry for that, really time to start to learn the major language</p>
  
  <p>basically if I call <code>SELECT * FROM Account Where idCustomerNumber = '000001' Order by Currency, AccountNumber</code> then SQL interpreter returns </p>
  
  <pre><code>5,1,"000001","000001EUR101","EUR"
  1,1,"000001","000001JPY101","JPY"
  6,1,"000001","000001USD101","USD"
  7,1,"000001","000001USD102","USD"
  </code></pre>
  
  <p>but now I want to programmatically determine that Resulset starts with USD accounts and rest of account would be Group by Currency then Order by AccountNumber</p>