Jump to content

1nstan7

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by 1nstan7

  1. 2lntppi.jpg

    Well Did I do w3schoolhelp and overclock Right?

    CREATE TABLE W3schoolhelp (aircraft_code CHAR(5) primary key,HTML CHAR(20),);CREATE TABLE Overclock_test(purchase_order_no NUMBER(3) primary key,coding CHAR(4) not null,PC INT(4),CONSTRAINT f_coding  FOREIGN KEY (coding}REFERENCES coder(coding)  );

    I'm not sure if I did the caps or if I missed anything?Also if you look at stackoverflow_help it has overclocking which is a primary key and a Forgien? How do I do that?Anyway all help is appreciated!

     

  2. Here is an example:quantity | Price | Total_order_price6 $6 $36I have created the quantity and price SQL:CREATE TABLE Ordered_Aircraft(quantity NUMBER(4),price Currency(4));Do I need to make one for total_order_price? If so how do I make it so it get the total price (quantity x Price)

     

    Between this is an example. I am trying to get total_order_price from quantity and price, how would I do that?

  3.  

    If your column name for the date is purchasedate then try...

    SELECT AVG(price) AS MyLABELFROM purchaseWHERE purchasedate >= '2014-02-13'

     

    Thank you!

  4. http://www.w3schools.com/sql/sql_func_avg.asp

     

    The example they show is

    SELECT AVG(Price) AS PriceAverage FROM Products;

     

     

    They did AVG(price) which gets the price but then they have "PriceAverage". Is that a new varible?

     

    My example table called "purchase":

    Car price purchase Date

    smcar £10 01/12/2014

    smfar £20 03/12/2014

     

    In my case will this be "SELECT AVG(price) as PriceAverage FROM purchase" ?

     

    If so how would I do this and show only purchases after 02/12/2014?

×
×
  • Create New...