Impossible to get Min, Max and median of the values in the date range values
HelloI had a requirement as to show the data of each charge group of wise men as '< 100' ' 100-199 "" 200-299 "" 300-399 "400-499, 500-599 600-699 700-799 800-899 900-999 > = 1000 '"»
With the query be able to get the count between the beach and the total below. But impossible to get the Min and Max values for this range. For example if the County < 100 is 3 then in these 3, the lowest value is need to display in the min. Idem for Max column also.
In the light of the median value on these values.
Thanks in advance.
Requirement is as below:
State < 100 100-199, 200-299 300-399 400-499, 500-599 600-699 700-799 800-899 900-999 > = 1000 Min Total median Max
AK 1 2 0 4 1 4 4 35 35 4 1 $25 $85 850 $1,200
AL 0 0 2 27 10 17 35 2 2 35 0 $103 100-$1 500 750
* "QUERY ' * '"
WITH t AS
(SELECT 'AL' State, 12 DUAL FROM VALUE
UNION ALL
SELECT 'AL' State, 67 FROM DUAL VALUE
UNION ALL
SELECT 'AL' State, 23 FROM DUAL VALUE
UNION ALL
SELECT 'AL' State, 12 DUAL FROM VALUE
UNION ALL
SELECT 'AL' State, 12 DUAL FROM VALUE
UNION ALL
SELECT 'AL' State, 78 FROM DUAL VALUE
UNION ALL
SELECT 'AL' State, 34 FROM DUAL VALUE
UNION ALL
SELECT 'AL' State, 4 DUAL FROM VALUE
UNION ALL
SELECT 'AL' State, 12 DUAL FROM VALUE
UNION ALL
SELECT 'AL' State, 15 VALUE FROM DUAL
UNION ALL
SELECT "AZ" State, FROM DUAL VALUE 6
UNION ALL
SELECT "AZ" State, 123 FROM DUAL VALUE
UNION ALL
SELECT "AZ" State, 123 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 23 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 120 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 456 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 11 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 24 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 34 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 87 DUAL FROM VALUE
UNION ALL
SELECT 'MY' State, 23 FROM DUAL VALUE
UNION ALL
SELECT 'MY' State, 234 DUAL FROM VALUE
UNION ALL
SELECT 'MY' State, 789 FROM DUAL VALUE
UNION ALL
SELECT "HD" State, VALUE FROM DUAL 54321).
-End of test data
AS T1
(SELECT State,
NVL (COUNT (DECODE (VALUE, 0, 0)), 0) '< 100 ',.
NVL (COUNT (DECODE (VALUE, 1, 1)), 0) '100-199.
NVL (COUNT (DECODE (VALUE, 2, 2)), 0) '200-299.
NVL (COUNT (DECODE (VALUE, 3, 3)), 0) '300-399.
NVL (COUNT (DECODE (VALUE, 4, 4)), 0) '400-499.
NVL (COUNT (DECODE (VALUE, 5, 5)), 0) '500-599,'
NVL (COUNT (DECODE (VALUE, 6, 6)), 0) '600-699.
NVL (COUNT (DECODE (VALUE, 7, 7)), 0) '700-799.
NVL (COUNT (DECODE (VALUE, 8, 8)), 0) '800-899.
NVL (COUNT (DECODE (VALUE, 9, 9)), 0) '900-999. "
NVL (COUNT (DECODE (VALUE, 10, 10)), 0) ' > = 1000.
(SELECT STATE,
CASE
WHAT VALUE < 100 THEN 0
WHAT A VALUE BETWEEN 100 AND 199 THEN 1
WHAT VALUE BETWEEN 200 AND 299, THEN 2
WHAT VALUE BETWEEN 300 AND 399 THEN 3
WHAT VALUE BETWEEN 400 AND 499 THEN 4
WHAT VALUE BETWEEN 500 AND 599 5 THEN
WHAT VALUE BETWEEN 600 AND 699 6 THEN
WHAT VALUE BETWEEN 700 AND 799 THEN 7
WHAT VALUE BETWEEN 800 AND 899 8 THEN
WHAT VALUE FROM 900 TO 999 9 THEN
WHAT VALUE > = 10 THEN 1000
END
VALUE
T)
GROUP BY State)
SELECTION STATE,
"< 100."
"100-199.
"200 299",
"300-399.
"400-499.
'500-599,'
"600-699.
"700-799.
"800-899.
"900-999."
"> = 1000."
'< 100 '.
+ "100-199.
+ "200-299.
+ '300-399.
+ '400-499.
+ "500-599.
+ '600-699.
+ "700-799.
+ "800-899.
+ '900-999 ".
+ ' > = 1000.
in total,.
less ("< 100",)
"100-199.
"200 299",
"300-399.
"400-499.
'500-599,'
"600-699.
"700-799.
"800-899.
"900-999."
("> = 1000 ') min_val,.
largest ("< 100",)
"100-199.
"200 299",
"300-399.
"400-499.
'500-599,'
"600-699.
"700-799.
"800-899.
"900-999."
("> = 1000 ') max_val
FROM t1
/
Why not keep it simple?
WITH t AS
(SELECT 'AL' state, 12 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 67 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 23 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 12 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 12 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 78 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 34 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 4 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 12 VALUE FROM DUAL
UNION ALL
SELECT 'AL' state, 15 VALUE FROM DUAL
UNION ALL
SELECT 'AZ' state, 6 VALUE FROM DUAL
UNION ALL
SELECT 'AZ' state, 123 VALUE FROM DUAL
UNION ALL
SELECT 'AZ' state, 123 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 23 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 120 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 456 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 11 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 24 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 34 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 87 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 23 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 234 VALUE FROM DUAL
UNION ALL
SELECT 'MA' state, 789 VALUE FROM DUAL
UNION ALL
SELECT 'MH' state, 54321 VALUE FROM DUAL)
SELECT state
, NVL( COUNT( case when VALUE < 100 then 0 end ), 0 ) "<100"
, NVL( COUNT( case when VALUE between 100 and 199 then 0 end ), 0 ) "100-199"
, NVL( COUNT( case when VALUE between 200 and 299 then 0 end ), 0 ) "200-299"
, NVL( COUNT( case when VALUE between 300 and 399 then 0 end ), 0 ) "300-399"
, NVL( COUNT( case when VALUE between 400 and 499 then 0 end ), 0 ) "400-499"
, NVL( COUNT( case when VALUE between 500 and 599 then 0 end ), 0 ) "500-599"
, NVL( COUNT( case when VALUE between 600 and 699 then 0 end ), 0 ) "600-699"
, NVL( COUNT( case when VALUE between 700 and 799 then 0 end ), 0 ) "700-799"
, NVL( COUNT( case when VALUE between 800 and 899 then 0 end ), 0 ) "800-899"
, NVL( COUNT( case when VALUE between 900 and 999 then 0 end ), 0 ) "900-999"
, NVL( COUNT( case when VALUE >= 1000 then 0 end ), 0 ) ">=100"
, count( value ) "total"
, min( VALUE ) "min"
, max( VALUE ) "max"
, avg( VALUE ) "avg"
, median( value ) "median"
from t
group by state
Tags: Database
Similar Questions
-
Script to get VM list and count on the data store
Hi all
I have a script of lining that gives me the number of virtual machines on the data store, I was looking for both number of virtual machines more VM names too.
Get-Datastore. Select Name, @{N = "NumVM"; E={@($_ | Get - VM). County}} | Sort name | Export-csv-path "C:\Users\userA\Desktop\Cluster_Host_Report\datastorevmcount.csv".
the above script gives not only. or the number of virtual machines on the datastore in VC, can we get that all virtual machines are there on the VC data store.
Thanks in advance a ton.
The ForEach loop do not place anything on the pipeline, you can fix this with the call operator (and)
& {{foreach ($ds in Get-data store)
Get - VM - Datastore $ds |
Select Name,
@{N = "Datastore"; E = {$ds. Name}},
@{N = "VM on the data store"; E = {$ds. ExtensionData.Vm.Count}}
}} | Export Csv report.csv - NoTypeInformation - UseCulture
-
Min - Max and the planning of Kanban
What are the factors or business cases that should be considered in the choice of planning that we should go?
Any help would be appreciated
My Client is interested in the above 2 methods
Thank you
MahendraIt of a broad question and is not easy to answer.
One major difference is your philosophy.
Kanban (if properly implemented) is pull based system.
Min - max is always anxious that is it looks at your current onhand, future demand, future supply and then comes up with a purchase requisition.But there is no hard rule.
Min - max works well when the issue of subinventory is not placed in a compartment. But in a workshop type of situation, you can have an operator goes the CRUDE inventory to get a bucket of screws.
If you ran min - max on the WIP subinventory, he will think that you have a lot and does not generate a purchase requisition.
But another operator may require that these screws and it may be out of them. In this case, a Kanban work better because as soon as the first operator took the last nth bucket, Kanban would have triggered the replenishment process.Kanban requires you to spend the time to analyze your problems to get to many of bin sizes and locations.
The general rule is that Min - Max is simpler to implement.
Kanban is a bit more complicated. So if your organization is not not mature enough or requires a simpler solution, min - max will work better.Sandeep Gandhi
-
Can we use the two Min max and MRP element
HelloWe can user Min max and the MRP of planning for the element in the same Org (11.5.10.2)
Thanks in advance
Ravi
Hi Ravi,
There are no restrictions such as a... but it would be an unnecessary activity.
If your release to users even planned orders by mistake... you would create duplicate supplies.
Is there any need specific job for which you want to use both of these methods of planning as a whole?
Kind regards
Mohan Balaji
-
Can I customize the size of the field on the unique choice fields. I want to get 10 everywhere and even with the label being small, i.e. 1, 2, 3, etc. I can't get to fit on a single line.
Hi restorechiropractic,
You can resize a single choice form field by dragging the right side of the form field item. However, even by doing this I was able to get eight choices by line. I don't think that there is no way to work around the limitation of the size of the form.
Please let us know if you have any additional questions.
Best,
Sara
-
SUM (case use this structure to get average values on the date range
I use:
Oracle SQL Developer (3.0.04) build hand - 04.34 Oracle Database 11 g Enterprise Edition 11.2.0.1.0 - 64 bit Production
How do we use the function sum with a structure of matter inside.
so I gave that looks like have an ID, date and value. I'm looking to get the day 7 medium for the date range of 04/01/2013 to 20/04/2013
* Please let me know if the table does not load.with t as ( select 1 ID_Key,to_date('4/1/2013','mm-dd-yyyy') date_val, 10 Value_num from dual union all select 1 ID_key,to_date('4/2/2013','mm-dd-yyyy'), 15 from dual union all select 1 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 20 from dual union all select 1 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 0 from dual union all select 1 ID_key,to_date('4/8/2013','mm-dd-yyyy'), 12 from dual union all select 1 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 8 from dual union all select 1 ID_key,to_date('4/10/2013','mm-dd-yyyy'), 6 from dual union all select 1 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 10 from dual union all select 1 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all select 1 ID_key,to_date('4/14/2013','mm-dd-yyyy'), 0 from dual union all select 1 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 10 from dual union all select 1 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 5 from dual union all select 1 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 2 from dual union all select 1 ID_key,to_date('4/20/2013','mm-dd-yyyy'), 3 from dual union all select 2 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 12 from dual union all select 2 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 15 from dual union all select 2 ID_key,to_date('4/6/2013','mm-dd-yyyy'), 5 from dual union all select 2 ID_key,to_date('4/7/2013','mm-dd-yyyy'), 7 from dual union all select 2 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 10 from dual union all select 2 ID_key,to_date('4/11/2013','mm-dd-yyyy'), 5 from dual union all select 2 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 0 from dual union all select 2 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all select 2 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 6 from dual union all select 2 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 8 from dual union all select 2 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 0 from dual union all select 2 ID_key,to_date('4/18/2013','mm-dd-yyyy'), 10 from dual union all select 2 ID_key,to_date('4/19/2013','mm-dd-yyyy'), 5 from dual )
I would get the average of 7 days, as long as there is date for the rank of enough previous dates, is it not, then it returns a null value.
the results should look like this
As you can see, there are gaps in the dates, the value is then processed by zeros for the 7Day_Avg and then ignored for the 7Day_Avg2 (not counted in the number of days on average do to no valu_num line)ID_Key date_val Value_num 7Day_Avg 7Day_Avg2 1 4/1/2013 10 null null 1 4/2/2013 15 null null 1 4/3/2013 20 null null 1 4/5/2013 0 null null 1 4/8/2013 12 6.71 11.75 1 4/9/2013 8 5.71 10.00 1 4/10/2013 6 3.71 6.50 1 4/12/2013 10 5.14 9.00 1 4/13/2013 0 5.14 7.20 1 4/14/2013 0 5.14 6.00 1 4/15/2013 10 4.86 5.67 1 4/16/2013 5 4.42 5.17 1 4/17/2013 2 3.85 4.50 1 4/20/2013 3 2.86 4.00 2 4/3/2013 12 null null 2 4/5/2013 15 null null 2 4/6/2013 5 null null 2 4/7/2013 7 5.57 9.75 2 4/9/2013 10 7.00 9.80 2 4/11/2013 5 6.00 8.40 2 4/12/2013 0 3.86 5.40 2 4/13/2013 0 3.14 4.40 2 4/15/2013 6 3.00 4.20 2 4/16/2013 8 2.71 3.80 2 4/17/2013 0 2.71 3.17 2 4/18/2013 10 3.43 4.00 2 4/19/2013 5 4.14 4.83
I tried something like this at first, but becomes "missing keyword" error
Should I have the structure outside the sum function?select t.*/, sum( case when date_val between :day2 - 6 and :day2 then value_num between date_val - 6 and date_val else null end ) as 7Day_avg form t
Any thoughts?
Published by: 1004407 on June 7, 2013 11:06Hello
If you want to calculate the average of the last 7 days, including the current day, then then RANGE should be 6 PRIOR, not 7.
Try this:
WITH got_min_date_val AS
(
SELECT id_key, date_val, value_num
MIN (date_val) compared to (AS min_date_val)
T
WHERE the date_val BETWEEN TO_DATE (April 1, 2013 ', "dd-mm-yyyy")
AND TO_DATE (April 20, 2013 ', "dd-mm-yyyy")
)
SELECT id_key, date_val, value_num
CASE
WHEN date_val > = min_date_val + 6
THEN SUM (value_num) OVER (PARTITION BY id_key
ORDER BY date_val
PRIOR TO TIER 6
)
/ 7
END AS avg_7_day
CASE
WHEN date_val > = min_date_val + 6
THEN AVG (value_num) OVER (PARTITION BY id_key
ORDER BY date_val
PRIOR TO TIER 6
)
END AS avg_7_day_2
OF got_min_date_val
ORDER BY id_key
date_val
;
Output:
ID_KEY DATE_VAL VALUE_NUM AVG_7_DAY AVG_7_DAY_2
---------- --------- ---------- ---------- ------------
1 1 APRIL 13 10
1 2 APRIL 13 15
1 APRIL 3, 13 20
1 5 APRIL 13 0
1 APRIL 8, 13 12 6.71 11.75
1 APRIL 9, 13 8 5.71 10.00
1 APRIL 10 13 6 3.71 6.50
1 12 APRIL 13 10 5.14 9,00
1 13 APRIL 13 0 5,14 7.20
1 14 APRIL 13 0 5,14 6.00
1 15 APRIL 13 10 4.86 5.67
1 16 APRIL 13 5 4.43 5.17
1 APRIL 17, 13 2 3.86 4.50
1 APRIL 20, 13 3 2.86 4.00
2 APRIL 3, 13 12
2 5 APRIL 13 15
2 6 APRIL 13 5
2 7 APRIL 13 7 5.57 9.75
2 9 APRIL 13 10 7,00 9.80
2 11 APRIL 13 5 6.00 8.40
2 12 APRIL 13 0 3.86 5.40
2 13 APRIL 13 0 3.14 4.40
2 15 APRIL 13 6 3.00 4.20
2 16 APRIL 13 8 2.71 3.80
2 17 APRIL 13 0 2.71 3.17
2 18 APRIL 13 10 3.43 4.00
2 APRIL 19, 13 5 4.14 4,83
Post edited by: FrankKulash
Sorry; I wanted to respond to OP, not Greg
-
The good examples of the construction and analysis of the data in bytes?
Hi all
Very soon, I'll have to find a way to build messages to bytes to send to a serial port and a serial port to receive and review to the basis of events out of...
However, before I delve into the complexities of the serial port communication and VISA, etc... I would just like to see some examples of working mainly with data of bytes.
I found how to get a digital constant the byte value... the binary representations signed and unsigned, etc..
However, if I could find a simple example or tutorial just to see how to assemble the byte-code... and how to analyze it, it would prove invaluable for me to study. I've never really worked at the byte level / binary front... and a few examples with LV would be very practical.
Anyone know of any good links out there something like this?
I'll eventually be sending 5 bytes out I need to build... and will receive 9 bytes in, each of which I need to parse out and respond...
Links or information GREATLY appreciated. I'm pretty decent analysis of the chains, real expressions, etc... but never worked with the construction and analysis of the data in bytes.
Thank you in advance,
Cayenne
If you are comfortable with binary data, you can use the Boolean charts. Look at the number of table Boolean and array Boolean functions numbers. Instead of masking with an AND, you can easy to use array index to check a bit particular.
-
I want to return the product to stop the renovation and to remove the data from credit card
I want to return the product to stop the renovation and to remove the data from credit card
To the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...
Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache. If it fails to connect, try to use another browser.Creative cloud support (all creative cloud customer service problems)
http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN ) -
Get number of records in the date range - IDE: PLSQL Developer
I want to count the number of records of members who register within a date range specified, based on effective and expiration dates and their "elg_code". I posted the SQL code for some examples of data. What I would like to see returned is in three columns of the counties where the eff_date date_exp members fall within the date range specified by the SQL and have an Elg_code of ' ' (space).
So what I would like is all members with elg_code ' ' where he eff_dt and exp_dt range is April 2012, 2012 MAY & JUN 2012. Thus, according to data from the sample I posted, Mark, where his elg_code record is ' ', his eff_dt is 01/01/2011 and April 2012 (30/04/2012) is his exp_dt. Range of the brand statement may 2012, but not MAY or JUNE of 2012. Marty would tally for the APR and MAY because his eff_dt is before MAY 2012 and his exp to MAY 2012. etc...
According to the data below, the results should resemble:
APR MAY JUN
4-3-2
APR should have FRANK, MARK, MARTY, MARY.
MAY should have FRANK, MARTY, MARY
JUN should have FRANK and MARIE
NOAM and JOHN should not appear as his records with elg_code ' ' have no documents eff_dt and exp_dt which are April-June 2012.
So what I tried without success as it appears that I have a kind of Cartesian question (?), is:
Select count (m1.mbr_name) APR,
Count (m2.mbr_name) MAY,
Count (m3.mbr_name) JUN
mbr2 M1,
mbr2 m2,
mbr2 m3
"where m1.eff_dt < ' 01 - may - 2012"
"and m1.exp_dt > ' 01-Apr-2012.
and m1.elg_code = ' '
"and m2.eff_dt < 1 June 2012"
"and m2.exp_dt > ' 01 - may - 2012"
and m2.elg_code = ' '
"and m3.eff_dt < 1 July 2012"
"and m3.exp_dt > 1 June 2012"
and m3.elg_code = ' '
Here's the DML
Thanks for any help!
create table mbr2 (mbr_name varchar (10), varchar (1) grpid eff_dt date, date of exp_dt elg_code varchar (1))
Commit
insert into mbr2 values ('BRAND', 'A', to_date (January 1, 2011 ',' DD-MM-YYYY '), to_date (April 30, 2012 ',' DD-MM-YYYY '), ' ')
insert into mbr2 values ('BRAND', 'A', to_date (May 1, 2012 ',' DD-MM-YYYY '), to_date (31 December 2013 ',' DD-MM-YYYY '), 'C')
insert into mbr2 values ('MARTY', 'A', to_date (January 1, 2011 ',' DD-MM-YYYY '), to_date (May 31, 2012 ',' DD-MM-YYYY '), ' ')
insert into mbr2 values ('MARTY', 'A', to_date (June 1, 2012 ',' DD-MM-YYYY '), to_date (31 December 2013 ',' DD-MM-YYYY '), 'C')
insert into mbr2 values ('FRANK', 'B', to_date (January 1, 2011 ',' DD-MM-YYYY '), to_date (June 30, 2012 ',' DD-MM-YYYY '), ' ')
insert into mbr2 values ('FRANK', 'B', to_date (July 1, 2012 ',' DD-MM-YYYY '), to_date (31 December 2013 ',' DD-MM-YYYY ""), 'C')
insert into mbr2 values ('MARY', 'B', to_date (January 1, 2011 ',' DD-MM-YYYY '), to_date (June 30, 2012 ',' DD-MM-YYYY '), ' ')
insert into mbr2 values ('MARY', 'B', to_date (July 1, 2012 ',' DD-MM-YYYY '), to_date (31 December 2013 ',' DD-MM-YYYY ""), 'C')
insert into mbr2 values ('JOHN', 'C', to_date (January 1, 2011 ',' DD-MM-YYYY '), to_date (July 1, 2011 ',' DD-MM-YYYY '), ' ')
insert into mbr2 values ('JOHN', 'C', to_date (July 1, 2011 ',' DD-MM-YYYY '), to_date (1 January 2012 ',' DD-MM-YYYY ""), 'C')
insert into mbr2 values ("NOAM" 'd', to_date (July 1, 2012 ',' DD-MM-YYYY '), to_date (31 December 2013 ',' DD-MM-YYYY '), ' ' ")
CommitThis gives you a report for the current month and the two front. Column header must be adjusted ;-)
select count( case when eff_dt < add_months(trunc(sysdate,'MM'), -1) and exp_dt >= add_months(trunc(sysdate,'MM'), -2) then 1 end) April , count( case when eff_dt < add_months(trunc(sysdate,'MM'), 0) and exp_dt >= add_months(trunc(sysdate,'MM'), -1) then 1 end) May , count( case when eff_dt < add_months(trunc(sysdate,'MM'), 1) and exp_dt >= add_months(trunc(sysdate,'MM'), 0) then 1 end) June from mbr2 where elg_code = ' ' and eff_dt < add_months(trunc(sysdate,'MM'), 1) and exp_dt >= add_months(trunc(sysdate,'MM'), -2) APRIL MAY JUNE 4 3 2
-
scanning question (Min, Max and Min return)
I have a tunable laser that is supposed to make a sweep of the Min to Max and then back to min.
For some reason, it seems to be an additional step after the peak wavelength as shown below.
Strange is that it seems to happen only when I put a wavelength that has 1 decimal place or 4 decimals.
I'm relatively new to labVIEW, Please HELP? any advice would be helpful.
This looks like a problem of accuracy point. Each language beats in it.
What you need to do is to calculate how many steps to the top must be made and then make comparisons on the step number (an integer).
Also, why use the node formula? A structure matter would take care of the logic.
-
Get the date range min/max for consecutive events.
Hi all...
I am fairly new to the programming of the DB and is working on some examples I picked up a few places. The database version is 10g R2.
I would like to configure the data here and I can explain my requirement.
create table table_1 (product_id varchar2(25), region_id number, event_id number event_date date, event_status number(1)) /
Now the data because it is->
insert into table_1 values ('Prod-1',10, null, to_date('01-feb-2014','dd-mon-yyyy'),null) / insert into table_1 values('Prod-1',10, 1001, to_date('10-mar-2014','dd-mon-yyyy'), 1) / insert into table_1 values('Prod-1',10, 1001, to_date('20-mar-2014','dd-mon-yyyy'), 3) / insert into table_1 values('Prod-1',10,1002, to_date('01-apr-2014','dd-mon-yyyy'), 1) / insert into table_1 values('Prod-1',10, 1002, to_date('10-apr-2014','dd-mon-yyyy'), 3) / commit /
If the table now contains the following data
select * from table_1;
PRODUCT_ID REGION_ID EVENT ID EVENT_DAT EVENT_STATUS
------------------------- ---------- -------- --------- ------------
Prod-1 10 1 February 14
Prod-1 10 1001 10 March 14 1
Prod-1 10 1001 20 March 14 3
Prod-1 10 1002 1 April 14 1
Prod-1 10 1002 April 10, 14 3
Now, the condition is as follows:
Above is the dates start and end for the tests on a product in a given region. The event_status column indicates the dates of beginning and end. Event_status = 1, for the date of beginning and the event_status = 3 of the end date.
A new event is now coming from March 21 and ending on March 31.
The power required is a product identifier / region; If there are events that are ending and then count the days, for example, 1001 to end on March 20, but now the new event begins on 21 March... and the new event ends on 31 March and event 1002 begins 01 - Apr... and so on.
The output required for this is as follows:
PRODUCT_ID REGION_ID EVENT_MIN_DATE EVENT_MAX_DATE
------------------------- ---------- -------------- --------------
Prod-1 10 10 14 March 10 April 14
The output should give a product identifier / region, when events are immediately after the other, out the min date of beginning and end of max for all these manifestations of "back to back".
Now I wrote the code for this, but it goes into a purely 'loop' for application in PLSQL... But my head tells me that if the results are correct. the PLSQL implementation is not the most efficient and effective way.
Can someone help me to form the query? I tried to use functions analytical min/max but it gives me the start and end dates back even if my events are not "back to back" or previous/succeed each other... so my query result is not quite correct.
Am reading on the TYPE clause but would be grateful if someone could help me with this query... or any other form better to implement this event so PLSQL can be used. The database version is 10g R2.
Thank you
K
PS - The number of such events back to back is limited to 4 and the events could be created in any order. But if someone could help me with the scenario above; am sure I could make a request addressed to any change in the order. :-)
No this isn't a recursive with clause, perhaps the UNION ALL you got confused. She will work with 10g.
Since there are 2 tables that you said, the block all_data brings together only the lines of the two tables. table_1 start_date and end_date are built from the event_status (where the max in group by).
-
Hello
I am trying to load the first set of PSPB files using import data
Header is:
Budget item, Cube name of loading data, view FTES, proposed, FTE Start Date, end Date of the FTE
And the first row of data:
< LINEITEM ("EPT and powers of the State"), > PlanHR, 'BegBalance, Budget, Base, any year, vacancy, unspecified, U09999, POS099999', 1, 01/01/1951,.
I get the following error when posting:
The 0 dimension is not valid
In addition, the dimension of the office's budget item
and size of the drivers of accounts with members proposed FTE FTE Start Date, end Date of the selected FTE.
Cannot find the error, please help.
Thank you
Just to let you know, part of the hierarchy of the dimension entity has been marked as invalid for the main Type of Plan. So that's what was causing the error.
-
Hey! I have the 1st generation mini iPad and runs the latest version of iOS 7. Do you think I should install iOS 9?
Question like this will get answers: Yes... No... sure... don't even think about it... absolutely... no way... my mini blah blah... etc.
The final decision is yours. Your device, you decide.
-
How can I get into CR and LF at the end of a line?
Original title: cr and Lf in notebook
I use a laptop with Windows 7 and XP, how can I get CR and LF at the end of a line
Hi Hugh,.
Thanks for choosing Microsoft Community!
The question you posted would be better suited on the MSDN forums. Please post the question here:
http://social.msdn.Microsoft.com/forums/en-us/categories
Hope the helps of information. Do not respond to help you further. We will be happy to help you.
-
Impossible to get anything it either appears in the Simulator
Hello
Despite the great "getting started" documentation and webcasts, can't do the Simulator to work...
I can ping, and I don't get any errors when I chose a configuration of Flash Builder series - it generates the .bar file well and gives me the following output:
Using icon: C:\Documents and Settings\aperryman\My Documents\_UI\PlayBook Tutorial\FB_PlayBookTest\bin-debug\BB_icon_72.pngThe bar manifest file is valid.Package created: C:\Documents and Settings\aperryman\My Documents\_UI\PlayBook Tutorial\FB_PlayBookTest/PlayBookTest.barAction: Install and LaunchFile size: 145772Installing com.amp.PlayBookTest.testLlBsYXlCb29rVGVzdCAgICA...actual_dname::com.amp.PlayBookTest.testLlBsYXlCb29rVGVzdCAgICAactual_id::testLlBsYXlCb29rVGVzdCAgICAactual_version::result::
But it stops there and nothing is displayed in the Simulator.
When I do a Debug launch, it's the same thing, except that I finally get a time-out error because it cannot connect to the debugger - probably not surprising.
When I package and deploy via the command line, I get even a promising "done" at the end:
C:\Documents and Settings\apman\My Documents\PlayBook Tutorial\FB_PlayBookTest\bin-debug>blackberry-airpackager -package PlayBookTest.bar -installApp -launchApp PlayBookTest-app.xml PlayBookTest.swf BB_icon_72.png -device 192.168.223.128Using icon: C:\Documents and Settings\apman\My Documents\PlayBook Tutorial\FB_PlayBookTest\bin-debug\BB_icon_72.pngThe bar manifest file is valid.Package created: PlayBookTest.barAction: InstallFile size: 145776Installing ...actual_dname::actual_id::actual_version::result::[-launchApp, -package, PlayBookTest.bar, -device, 192.168.223.128]Action: LaunchLaunching com.amp.PlayBookTest.bXAuUGxheUJvb2tUZXN0ICAgICA...done
but nothing in the Simulator.
The app is just the sample helloWorld application and works very well when I compile it as desktop AIR application.
I'm on Windows XP and I don't have the admin rights.
Does anyone have an idea what else could be wrong?
Thank you very much
Anna
Finally got it works!
Apparently not that if anyone else had the same problem, but just in case, here is what does the job:
I just made a deployment command line with the flag set - devMode (without it I got the same results with Flash Builder or blackberry-airpackager, i.e. no error, but nothing appearing in the Simulator):
>blackberry-deploy -installApp -devMode -device 192.168.223.128 -package PlaybookTest.bar
And the strange thing is: now that it's installed, I'm able to run my FlashBuilder debug configuration and it installs and launches new construction without problems!
Anyway, thanks again to all who have tried to help - I learned a few things along the way...
Anna
Maybe you are looking for
-
Dual-boot a Satellite A660-18 - BSOD install Win XP
I recently bought the laptop above for use on astro photography.A lot of the software I use is 32 bit and XP to use so I thought that I could set up a dual boot on the laptop using Win 7 64 bit OS (pre-installed) for processing in CS5 after that I ca
-
Upgrade Windows 7 recommended to uninstall Window Mobile Device Center 6.1 now does not play on the CD player
-
memory usage svchost.exe high - wuauserv
I would like to know on why svchost.exe high memory on wuauserv use get. Should I wait and let working alone on the next 24 hours to windows update? I didn't get no idea why it takes so long to update windows, is there any download offline pack to do
-
I don't know if this is the case for you. I was unable to log on to another account because as you say the creative cloud app repeated verify my email address that could not be avoided. What I found is that I disconnected my pc account and connected
-
Latency even when high ping ping localhost
HelloSince a few days, maybe a week we are faced with a strange ping latency.At first, we thought it has something to do with our network equipment, but after a few hours of investigation, we arrive at the following conclusions:(1) Pinging VM VM (bot