title: SQL is Giving the Error: ORA-00909: Invalid Number of Arguments
body: <p>I have two errors in my queries places check my queries right or wrong I'm new to Oracle so don't mind</p>
  
  <p>Here is the SQL</p>
  
  <p>SQL is Giving the Error: <code>ORA-00909: Invalid Number of Arguments</code> </p>
  
  <pre><code>CREATE VIEW order_summery
  AS
  SELECT o.id,
      o.order_date,(cu.first_name||' '|| cu.last_name) as customer_name
      ,Sum(NVL(p.price,0)) as total_amount
      ,Sum(NVL(p.discount_amount,0)) as discount_amount
      ,NVL(Sum(NVL(p.price,0),0)) - NVL(Sum(NVL(p.discount_amount,0)),0) as final_amount
  FROM tbl_order o
  INNER JOIN tbl_customer cu on o.customer_id = cu.id
  INNER JOIN tbl_order_item oi on o.id= oi.order_id
  INNER JOIN tbl_product p on oi.product_id= p.id;
  </code></pre>
  
  <pre><code>SQL Error: ORA-00936: missing expression
  00936. 00000 -  "missing expression" 
  </code></pre>
  
  <pre><code>CREATE VIEW sales_report
  AS
  SELECT o.id,
      ,o.order_date
      ,(cu.first_name||' '|| cu.last_name) as customer_name,
      ,Sum(NVL(p.price,0)) as total_amount
      ,Sum(NVL(p.discount_amount,0)) as discount_amount
      ,NVL(Sum(NVL(p.price,0),0)) - NVL(Sum(NVL(p.discount_amount,0)),0) as final_amount
      ,CASE o.is_deliverd WHEN 'y' THEN 'Deliverd'  ELSE 'Not Deliverd' END as status    
  FROM tbl_order o
  INNER JOIN tbl_customer cu on o.customer_id = cu.id
  INNER JOIN tbl_order_item oi on o.id= oi.order_id
  INNER JOIN tbl_product p on oi.product_id= p.id;
  </code></pre>