How to make a self-calculated query in SQLITE on the same table?

0

I need to bring two fields from the same table, count the clients that comply with having a field with certain content and then divide them You could help me to do the following query in the correct way in the sqlite database engine.

  

Select (three / zero) as Value from (select

     

count (client_code)

     

FROM Farm_Report where F_alta="2018-02-01" and Difference = 3) as three,

     

(Select count (client_code) FROM Where_Report where

     

F_high="2018-02-01" and Difference = 0) as zero;

    
asked by Deivid Stiven Medina Hernandez 28.09.2018 в 21:53
source

0 answers