Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. sqlite

sqlite

Scheduled Pinned Locked Moved Database
databasesqlitetutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jashimu
    wrote on last edited by
    #1

    Hi All, I have two tables. I want to avg both number from table A and table B from the same cell.

    2 3 4 3 4
    Table A

    1 2 5 3 1
    Table B

    I have two tables like above. I want to average from table one cell one and table two cell one then average both number and put into a third table or get the data and use it.
    For example,

    1.5 2.5 4.5 3 2.5

    How do I do this in sql statement .

    C L 2 Replies Last reply
    0
    • J jashimu

      Hi All, I have two tables. I want to avg both number from table A and table B from the same cell.

      2 3 4 3 4
      Table A

      1 2 5 3 1
      Table B

      I have two tables like above. I want to average from table one cell one and table two cell one then average both number and put into a third table or get the data and use it.
      For example,

      1.5 2.5 4.5 3 2.5

      How do I do this in sql statement .

      C Offline
      C Offline
      Corporal Agarn
      wrote on last edited by
      #2

      You would need a common key column as some SQL programs do not keep the order of the table.

      J 1 Reply Last reply
      0
      • C Corporal Agarn

        You would need a common key column as some SQL programs do not keep the order of the table.

        J Offline
        J Offline
        jashimu
        wrote on last edited by
        #3

        djj55 wrote:

        You would need a common key column as some SQL programs do not keep the order of the table.

        I am not sure what are you saying.but I do have a column that is comon for for both tables.

        1 Reply Last reply
        0
        • J jashimu

          Hi All, I have two tables. I want to avg both number from table A and table B from the same cell.

          2 3 4 3 4
          Table A

          1 2 5 3 1
          Table B

          I have two tables like above. I want to average from table one cell one and table two cell one then average both number and put into a third table or get the data and use it.
          For example,

          1.5 2.5 4.5 3 2.5

          How do I do this in sql statement .

          L Offline
          L Offline
          loyal ginger
          wrote on last edited by
          #4

          You may need to explain the terminology here because I have no idea what "cell one" means in your question. If you use the term "field", "record", etc., you can make your question more understandable by others. As for your question, you can make a query on the union of the two tables to find the averages.

          J 1 Reply Last reply
          0
          • L loyal ginger

            You may need to explain the terminology here because I have no idea what "cell one" means in your question. If you use the term "field", "record", etc., you can make your question more understandable by others. As for your question, you can make a query on the union of the two tables to find the averages.

            J Offline
            J Offline
            jashimu
            wrote on last edited by
            #5

            Sory for the confusion. I should tell you that I am really very very beginer about database. I will find out how to do union and query it. thanks.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups