TO_CHAR(CAST(DECODE(COUNT(*),0,0,SUM(CASE WHEN pd.score >=(select qualiscore from tb_agent_crmscallappeal where appealid="1") THEN 1 ELSE 0 END)/COUNT(*)*100) AS NUMBER(10,2)),"990.00") || "%" AS qualifi,
TO_CHAR(CAST(DECODE(COUNT(*),0,0,SUM(CASE WHEN pd.score >=(select qualiscore from tb_agent_crmscallappeal where appealid="1") THEN 1 ELSE 0 END)/COUNT(*)*100) AS NUMBER(10,2)),"990.00") || "%" AS qualifi,
use tools, online or client, but your SQL
is incomplete and may not be formatted correctly. I formatted it with navicat
and it looks like the following
TO_CHAR (
CAST(
DECODE(
COUNT(*),
0,
0,
SUM(
CASE
WHEN pd.score >= (
SELECT
qualiscore
FROM
tb_agent_crmscallappeal
WHERE
appealid = '1'
) THEN
1
ELSE
0
END
) / COUNT(*) * 100
) AS NUMBER (10, 2)
),
'990.00'
) || '%' AS qualifi,
background: 1. I am a java programmer 2. Recently interviewed for a senior development position 3. The previous project mainly used less oracle,mysql, and the companies interviewed basically used mysql s 4. I am weak in the database 5. Recently, I...
enter the order number on the page to query the data in Table A, extract some of the field values in Table A to the page, and make changes. The other field values remain the same. insert the modified value and the unmodified field into the new table b...
is there any way? such as recommended books, blogs, etc. ...
1. How to decompose (A, B)-> E, (C, D)-> E, A-> C, C-> An into BCNF,? 2, U = (Agraine Brecinct C pyrrhene E) F = {B-> Greco ce-> Breco C-> Areco B-> Dle le C-> D}. Decompose into BCNF? 3. The BCNF decomposition that I understand at present is to fin...
there is a problem. What should I do if I want to take a record that matches multiple characters in a field? select * from actor where last_name like ( % DAVI% , MOSTEL% , ABC , kkk%aa ) the above sql statement is incorrect. Like does not sup...
1. If you use select * from APowerB without any conditions, the result will be displayed associated with tables an and b, but the result will be repeated many times 2, and select * from a join b, will not add any query conditions, and the result will b...
select regexp_replace (regexp_replace) Yu 0min Za , , ), [ u4e00 - u9fa5. The running result of ORACLE ORACLE] {1,} , U4e00 - u9fa5. The result of Yu Minli GP running:?? The result of HIVE running in Yu 0 min Za:? 0Za Why are the res...
this is the xml file: the following error: -sharp-sharp-sharp Error updating database. Cause: java.sql.SQLException: sql injection violation, syntax error: TODO : COMMA values : insert into BIA_HGU_INFO (HGU_ID, AREA_CODE, BIND_CODE, SN, HG...
isolation level and lock appearance seem to solve the problems caused by database transaction concurrency, right? What s the relationship between the two? I m a little confused ...
BEGIN AN_O_RET_CODE := 0; AC_O_RET_MSG := ; select COUNT (*) INTO COUNTALL from ( select kf_id,o.name kf_name,sessionid,decode(score, 1 , , 2 , , 0 , ,score) as satis,to_char(create_time, yyyy-mm-dd HH:MM:ss ) ...
this is xml <resultMap id="result_report_QDHW_05" class="com.sunyard.csr.vo.Report_QDHW_05"> <result property="TIME_KEY" column="TIME_KEY" > <result property="...
<select id="select_label" resultMap="XykLabelRecords" parameterClass="java.util.HashMap"> <![CDATA[select * from (select * from xyk_label_records where customer_number=-sharpcustomer_number-sharp and is_st...
as mentioned above, I want to count the number of records in the database. If a field is required to repeat, the count is 0. For example: a database of car sales invoices, in which there is a frame number field referred to as CJHM. I want to count the n...
on a recent project, I found that all data types of entity classes are strings, no matter what type of oracle database can be inserted and do not need to be converted. Did the bottom layer of jdbc help me convert it? ...
question: select * from table where created_at > where is the problem? How to solve? answer: time writes dead, closes, time opens, there must be closing time. The question is, why should it be a closed interval when querying this time field? It ...
use leftJoin multi-table join lookup. Finally, a field in select is a field from count in one of the right tables, but if there is no count data in that table, the entire query will lose the result. Now you want to keep the data in the left table if the...
the demand is to query the book browsing data of the last 100 days, and sort the first 23 searches according to the id grouping of browsed books . The statement is: SELECT ip_times.query, books.name,books.cover, COUNT (books.id) AS VALUE FROM ip_time...