sql query
SQL QUERY BROWSER
declare @cout00 int
declare @cout01 int
declare @cout10 int
declare @cout11 int
declare @c1 float
declare @gss float
select @cout00=count(*) from aws.dpscomp where ra='0' and RAcal='0'
print @cout00
select @cout01=count(*) from aws.dpscomp where ra='0' and RAcal!='0'
print @cout01
select @cout10=count(*) from aws.dpscomp where ra!='0' and RAcal='0'
print @cout10
select @cout11=count(*) from aws.dpscomp where ra!='0' and RAcal!='0'
print @cout11
select @c1=((@[email protected])*(@[email protected]))/(@[email protected][email protected][email protected])
print 'C1='+convert(decimal(10,0),@c1)
select @gss=(@[email protected])/(@[email protected][email protected]@c1)
print 'GSS='+convert(decimal(10,0),@gss);
this is the query i have written for the table "dpscomp" -
station date month time ra Racal
DPS 3 1 13:30 0 0
DPS 3 1 14:30 0 0
DPS 3 1 15:30 1 0
DPS 3 1 16:30 0 0
DPS 3 1 17:30 8 8
DPS 3 1 18:30 0 0
DPS 3 1 20:30 0 5
DPS 3 1 21:30 0 0
DPS 3 1 23:30 0 0
DPS 4 1 0:30 0 0
DPS 4 1 2:30 0 0
DPS 4 1 3:30 0 0
DPS 4 1 4:30 0 0
DPS 4 1 5:30 0 0
DPS 4 1 6:30 0 0
DPS 4 1 7:30 0 0
DPS 4 1 8:30 0 0
DPS 4 1 9:30 0 0
DPS 4 1 10:30 0 0
DPS 4 1 11:30 0 0
DPS 4 1 12:30 0 0
DPS 4 1 13:30 0 0
DPS 4 1 17:30 0 0
DPS 5 1 5:30 0 0
DPS 5 1 6:30 0 0
DPS 5 1 7:30 0 0
DPS 5 1 9:30 0 0
DPS 5 1 10:30 0 0
DPS 5 1 11:30 0 0
DPS 5 1 12:30 0 0
DPS 5 1 13:30 0 0
DPS 5 1 14:30 0 0
DPS 5 1 15:30 0 0
DPS 5 1 16:30 0 0
DPS 5 1 17:30 0 0
DPS 5 1 18:30 0 0
DPS 5 1 19:30 0 0
DPS 5 1 20:30 0 0
DPS 5 1 21:30 0 0
DPS 5 1 22:30 0 0
DPS 5 1 23:30 0 0
DPS 6 1 5:30 0 0
DPS 6 1 6:30 0 0
DPS 6 1 7:30 0 0
DPS 6 1 8:30 0 0
DPS 6 1 9:30 0 0
DPS 6 1 10:30 0 0
DPS 6 1 11:30 0 0
DPS 6 1 12:30 0 0
DPS 6 1 13:30 0 0
DPS 6 1 14:30 0 0
DPS 6 1 15:30 0 0
DPS 6 1 16:30 0 0
DPS 6 1 17:30 0 0
DPS 6 1 18:30 0 0
DPS 6 1 20:30 3 0
DPS 6 1 21:30 3 0
DPS 6 1 22:30 3 0
DPS 7 1 5:30 6 0
DPS 7 1 6:30 6 0
DPS 7 1 6:30 6 0
but i m not able to execute it as i want to count according to the conditions and calculate GSS and C1 ..and i was trying to declare variables cout00,cout01,cout10,cout11 in which the values of counted rows is declared in that variable according to the conditions i applied..plz help me.
View Answers
Ads
Related Tutorials/Questions & Answers:
Sql Query
Sql Query Is this
query work in Db2 or not ?
Select * from FORUM LIMIT 2
Sql Query
Sql Query Is this
query work in Db2 or not ?
Select * from FORUM LIMIT 2
Advertisements
sql query
sql query two tables are emp,loc
write a
query to display all the emp information whose locname not equal to bangalore
sql query
sql query hi friend,
Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need
sql query plz help to me
sql query
sql query hi friend,
Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need
sql query plz help to me
sql query
sql query hi friend,
Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need
sql query plz help to me
Sql Query
Sql Query Hi M Navjeet Ghai
I want to know How to Show A name(Like Navjeet Ghai And Manpreet Singh Sodhi) of employees from a employee table as N.Ghai & M.S.Sodhi by using
sql query
SQL Query
SQL Query Selecting the third highest salary of Employee without using any subquery?
Here is a
query:
SELECT salary FROM employee ORDER BY salary DESC LIMIT 2,1
SQL QUERY
SQL QUERY am a having a table 'PROGRAMMER' with columns... C pascal
Bhanu
Sql... Pascal
Sql
Mahesh DBASE Cobol
sql query
sql query
SQL QUERY BROWSER
declare @cout00 int
declare @cout01 int
declare @cout10 int
declare @cout11 int
declare @c1 float
declare @gss float...);
this is the
query i have written for the table "dpscomp" -
station date month
SQL query
SQL query I need to combine two tables in order to get the values. As an example we have three tables
having namely usertable,job table and jobaccess table. In usertable (Userid,Empid,name,Role) details have been stored
Update SQL Query Example
Update
SQL Query Example Hi,
I am beginner in
SQL (MySQL) and trying to learn Update
SQL Query with Example code. Can anyone explain me the
SQL Update
query with an example code?
Thanks
Hi,
A simple example
sql query search function
sql query search function i have a textbox on a form , i like a search a data in the form, when i give whatever name and id or etc..its will search and show the same form , so help me using jsp
ModuleNotFoundError: No module named 'sql-query'
ModuleNotFoundError: No module named '
sql-
query' Hi,
My Python... '
sql-
query'
How to remove the ModuleNotFoundError: No module named '
sql... have to install padas library.
You can install
sql-
query python with following
SQL QUERY ERROR
SQL QUERY ERROR Im writing a
query which shows error of INVALID CHARACTER
The
Query is
Insert into
PMST_EMP_MST(PMSNUM_EMP_ID,PMSSTR_EMP... THE FORM IS THROWING THE ERROR OF INVALID CHARACTER BUT THE SAME
QUERY IS RUNNING
Sql query Duplicate
Sql query Duplicate I have a Employee table with duplicate ID values...
3 D Delhi
Then we have used the following
query to find the duplicate data...');
You can use following
query to find the duplicate id:
select id, count(id
SQL date query
SQL date query how to get ( 15 march 2011) and (15/03/2011) output using
SQL
Use the following queries to get the data from database in the given format.
For (15 march 2011) format:
SELECT DATE_FORMAT(dob, '%d %M
JDBC- SQL spatio-temporal query
JDBC-
SQL spatio-temporal query Any one give me a JDBC
sql query for my spatio temporal
query?
Trajectory table
OBJID PLACE
7 H
8
Q
9 W
10... as shown in above. I want a spatio-temporal
query using JDBC-
SQL to retrieve
JDBC- SQL spatio-temporal query
JDBC-
SQL spatio-temporal query Any one give me a JDBC
sql query for my spatio temporal
query?
Trajectory table
OBJID PLACE
7 H
8
Q
9 W
10... as shown in above. I want a spatio-temporal
query using JDBC-
SQL to retrieve
Sql Join Query
Sql Join Query aTable Name : TblState
Stid StateName CountryId
---------------------------------------------
01 TN 01
02 KR 01
03 KL 01
04 WB 01
05 New
SQL Backup query with where statement
SQL Backup
query with where statement
SQL Backup
query with where statement ...
The Tutorial show you a example from '
SQL Backup
query with where
to write an SQL query using insert statement
to write an
SQL query using insert statement I need to write an
sql query for the below using InSERT command.pls help.
Insert 5-star ratings by James Cameron for all movies in the database. Leave the review date as NULL
PHP SQL Query Where Clause
PHP
SQL Query Where Clause
This example illustrates how to create and execute the
sql...;
from the
sql query execution, we have created whereClause.php page.
First