Re: How to get Max (all values of columns) records on a partition interval
HelloHours Days Name used_size
1 01-09-012 R1 1100
10 01-09-012 R1 1150
15 01-09-012 R1 1160
23 01-09-012 R1 1200
1 01-08-012 R1 1600
10 01-08-012 R1 1700
15 01-08-012 R1 1800
23 01-08-012 R1 1500
1 01-09-012 J1 10
10 01-09-012 J1 20
15 01-09-012 J1 30
23 01-09-012 J1 60
1 01-08-012 J1 70
10 01-08-012 J1 5
15 01-08-012 J1 17
23 01-08-012 J1 22
Needed o/p:
23 01-09-012 R1 1200
23 01-08-012 R1 1500
23 01-09-012 J1 60
23 01-08-012 J1 22
We have table as above, IE. everyday, there are records at regular intervals of hours for different users.I want to get a single record of every day for one hour on this day for all users.
Please let me know if my question was unclear?
-Thank you
Another way, maybe more simple here, here could be just group by user, day.
SELECT user, day, Max(hours) max_hours, Max (used_size) KEEP (DENSE_RANK LAST ORDER BY hours) mh_used_size
FROM (table)
GROUP BY user, day
ORDER BY user, day
Tags: Database
Similar Questions
-
How to get the decimal value of a string of international currency
Hi all
How to get the decimal values to a string of international currency.
Finally, we get to the real problem.
You can use location functions or write your own using string functions already mentioned...
http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/
-
DVT:pivotFilterBar - how to get the selected values of the filter
Hi all
I have a question: how to get the selected values from the pivot table filter bar programmatically?
I tried to use
but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
Environment: JDev 11.1.1.3.0 without tasks.
Thank you
MiroslawHello
You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:
Download the template of the bar pivot filter instance
QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
ListcriterionList = conjunctionCriterion.getCriterionList ();
for (int i = 0; i)<_criterionList.size(); i++)="">
AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion._selected is the currently selected value
Selected object = criterion.getValues () .get (0);System.out.println (_selected);
}Hope that helps,
Chadwick -
I installed vista SP2 and when I started my computer back up everything on my computer is missing... How to get back all my pictures and music files? I tried to do a system restore, and I can't go back any further, then the service pack install... so everything is still missing... Please help!
Hello
Were there any changes or updates made on the computer?
I suggest you to see link and check if it helps.
Recover lost or deleted files
http://Windows.Microsoft.com/en-us/Windows-Vista/recover-lost-or-deleted-files
See the articles and looking for the missing files.
Find a file or folder
http://Windows.Microsoft.com/en-us/Windows-Vista/find-a-file-or-folder
Tips for finding files
http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-finding-files
-
full outer join: how to get without null values?
full outer join: how to get without null values?Hello
Please go well this url
http://asktom.Oracle.com/pls/asktom/f?p=100:11:999478429860455:P11_QUESTION_ID:6585774577187
Thank you
Prakash P -
How to get the RGB value of a pixel in a psd document using scripting Photoshop
Hi, guys! Does anyone know how to get the RGB value of a pixel in a psd document using scripts in Photoshop? I myself have missed for a long time and could not resolve. I am very happy to hear your voice as soon as possible!
Here is an example...
var originalUnits = app.preferences.rulerUnits; app.preferences.rulerUnits = Units.PIXELS; var doc = activeDocument; var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1)); var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5)); var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14)); alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3); var decColour = eyeDropperRGB(40,doc.height-14); alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]); app.preferences.rulerUnits = originalUnits; function GetHexColour(reqHex){ var out=''; for(No in colours = reqHex){ out = out.concat(zeroPad(d2h(reqHex[No]),2)); } return out; }; function eyeDropperRGB(x,y) { var x2 = x + 1; var y2 = y + 1; var out = new Array(3); activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false); for(ch in list = ["Red", "Green", "Blue"]) { histogram = activeDocument.channels[list[ch]].histogram; for (i = 0; i <= 255; i++) { if (histogram[i]) { out[ch] = i; break; } } } return out; }; function d2h(d) {return d.toString(16);} function zeroPad(n, s) { n = n.toString(); while (n.length < s) n = '0' + n; return n; };
-
How to get the return value from Java runtime.getRuntime.exec?
I am running shell from a (GR 11, 2) Oracle database commands on aix.
But, I would get a return value of a shell comand... as you get with "echo $?"
I use a code like
but I do not get a return value... because I don't know how to get the return value...CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS import java.io.*; public class Host { public static int executeCommand(String command) { int retval=0; try { String[] finalCommand; finalCommand = new String[3]; finalCommand[0] = "/bin/sh"; finalCommand[1] = "-c"; finalCommand[2] = command; final Process pr = Runtime.getRuntime().exec(finalCommand); pr.waitFor(); } catch (Exception ex) { System.out.println(ex.getLocalizedMessage()); retval=-1; } return retval; }; /
Published by: user9158455 on 22-Sep-2010 07:33Hello
Your pr.exitValue () has tried?
I think you also need a finally block that destroys the sub-process
Concerning
Peter -
Can I know how to get the 2 peak values v1 and v2 and 2 duration times t1 t2.
Since there is a small amplitude noise, difficult to use the Max simplely.
May need to use a filter such as wavelets or TREE to Denoise it first. Can I know how to use, any Toolbox in labview. How do the curve smooth first.
Thank you.
I can't watch your vi now (I'm at work), but if your signals are long enough, you might consider a median filter. You can set the number of points before and after use. I found that it is useful for some smoothing problems (not all).
-
How to get 3table of values in the row of acronym in 11g
Hi all
I have 3 tables,
In all ck_no tables is common.Tab1 Ck_no amt 1 2000 Tab2 Ck_no Line amt 1 1 1000 1 2 1000 Tab3 Ck_no Line sub amt 1 1 1 500 1 1 2 500 1 2 1 100 1 2 2 200 1 2 3 700
Since the 3 tables above, I need the output in the following format,
Can someone help me in this?Amt1 amt2 amt3 amt4 amt5 amt6 amt7 amt8 amt 9 2000 1000 1000 500 500 500 100 200 700
Thank you
Kind regards
Gurujothi
Published by: Gurujothi on July 9, 2012 20:46
Published by: Gurujothi on July 9, 2012 20:47Gurujothi wrote:
I know how to get the values in a row for a single column,
...
but I get the error,Too Many values
How do I change this?
Please post your data in the example, the expected results of these data and explain the logic so that we can understand how the data relate to each other.
In your original post, it is not clear how amt4, amt5 abd amt6 therefore show them all 500 when there are only two 500 values in the source data.
SQL> ed Wrote file afiedt.buf 1 with Tab1 as (select 1 as ck_no, 2000 as amt from dual) 2 ,Tab2 as (select 1 as ck_no, 1 as line, 1000 as amt from dual union all 3 select 1, 2, 1000 from dual) 4 ,Tab3 as (select 1 as ck_no, 1 as line, 1 as sub, 500 as amt from dual union all 5 select 1, 1, 2, 500 from dual union all 6 select 1, 2, 1, 100 from dual union all 7 select 1, 2, 2, 200 from dual union all 8 select 1, 2, 3, 700 from dual) 9 -- 10 -- END OF TEST DATA 11 -- 12 select ck_no 13 ,max(decode(rn,1,amt)) as amt1 14 ,max(decode(rn,2,amt)) as amt2 15 ,max(decode(rn,3,amt)) as amt3 16 ,max(decode(rn,4,amt)) as amt4 17 ,max(decode(rn,5,amt)) as amt5 18 ,max(decode(rn,6,amt)) as amt6 19 ,max(decode(rn,7,amt)) as amt7 20 ,max(decode(rn,8,amt)) as amt8 21 ,max(decode(rn,9,amt)) as amt9 22 from ( 23 select ck_no, amt, row_number() over (partition by ck_no order by ord, line, sub) as rn 24 from ( 25 select 0 as ord, ck_no, 0 as line, 0 as sub, amt from tab1 union all 26 select 1 as ord, ck_no, line, 0 as sub, amt from tab2 union all 27 select 2 as ord, ck_no, line, sub, amt from tab3 28 ) 29 ) 30* group by ck_no SQL> / CK_NO AMT1 AMT2 AMT3 AMT4 AMT5 AMT6 AMT7 AMT8 AMT9 ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- 1 2000 1000 1000 500 500 100 200 700
-
Hi all
I have a system of LabVIEW which takes advantage IMAQ tools and features of the Vision Development Module. A useful feature that I put in place is to be able to take a snapshot of the video stream and then subtract this single image among the subsequent images.
What I want to do is to collect a series of images instead of one, and then create a unique image of these frameworks is just the maximum value of pixels in each pixel (a bit like a display persistent).
It would probably be very easy to be implemented by converting the image to a table and then by doing math number on the table and then turning into an image, but I hope that someone here may know how to use the IMAQ/VDM tools to do this in a way more compact.
Thank you very much
MK
How about using Max comparison IMAQ operation?
-
How to get the fnd_profile.value in the host program
Hi all
How to get the FND_PROFILE. VALUE('ORG_ID') in the host program.
I loved not below, but it failed.
v_return =' $ORACLE_HOME/bin/sqlplus - s $FCP_LOGIN < < END
set pagesize 0
trigger the echo
fnd_profile. Value ('ORG_ID');
EXIT;
END '
echo $v_return
but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »
Kind regards
UVA
> but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »
.. .who is the same thing that will happen if you run SQL * more and type "fnd_profile.value...". »
Assuming that fnd_profile.value is a function, you must select from the something (say double) or assign to a variable.
-
How to get a lookup value?
Hello
I'm looking how to get the value of the select list of an account by having only the Id of the account. I don't know if it is possible so I use this query:
-----
function getAccountInfo (rowid) {}
soapAction var = ' document / urn: crmondemand/ws/account/10 / 2004:AccountQueryPage ";
var miSoap = ' < soapenv:Envelope xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/' > < soapenv:Header /------> < soapenv:Body > < ns:AccountWS_AccountQueryPage_Input xmlns:ns = "urn: crmondemand/ws/account/10/2004" > \n ";
miSoap += ' < ns:UseChildAnd > true < / ns:UseChildAnd > \n ";
miSoap += ' < ns:StartRowNum > 0 < / ns:StartRowNum > \n ";
miSoap += ' < ns:PageSize > 10 < / ns:PageSize > \n ";
miSoap += ' < acc:ListOfAccount xmlns:acc = "urn: / xml/crmondemand/account" > \n ";
miSoap += ' < acc:Account > \n ";
miSoap += ' < acc:AccountId > = \ "+ rowid +'\ ' < / acc:AccountId > \n";
miSoap += ' < acc:AccountName /------> \n ";
miSoap += ' < acc:AccountType /------> \n ";
miSoap += ' < acc:CallFrequency /------> \n ";
miSoap += ' < / acc:Account > \n ";
miSoap += ' < / acc:ListOfAccount > \n ";
miSoap += ' < / ns:AccountWS_AccountQueryPage_Input > < / soapenv:Body > < / soapenv:Envelope > ';
Return ((miSoap, SOAPAction) SendQuery);
}
-----
The problem of this query is that it does not provide the value of the list of choices, but only the picklits ID or default value in the choice list. I didn't need all because the values had been renamed then what I question is the value of the list of choices.
Thanks and greetingsHello
I don't think that you can be able to get the display of the drop-down list of values by using Web services, it will always return the lookup ID values.
It is recommended to keep the two identical values (display value and the value of the Id).If someone has renamed/changed the display of the value of the drop-down list value then you must use existing Id values or disable the existing value of the selection list and create a new value in the choice list that has the same value display and the value of the ID.
concerning
Goud -
How to get the internal values of Photoshop one ID assigned
I have difficulties to obtain values for the internal settings. It's less hard to set, you can use the Listener Script to get the code to use. Presumably, you use executeActionGet() with an ActionReference. The problem is to know how to build the ActionReference. It doesn't seem to be a lot of documentation on that.
My immediate problem is how to get the parameters of the 3D camera. I know this requires Photoshop Extended, but the principle must be the same. This code sucessfully defines these parameters:
< code >
function setPhotoshopCamera (angleX, angleY, angleZ, posX, posY, posZ) {}
Camera
var idGet3DCamera = stringIDToTypeID ("get3DCamera");
var idSet3DCamera = stringIDToTypeID ("set3DCamera");
var descCamera = new ActionDescriptor();
Camera position
var idKey3DCurrentCameraPosition =
stringIDToTypeID ("key3DCurrentCameraPosition");
var descCameraPosition = new ActionDescriptor();
var idkeythreeDXPos = stringIDToTypeID ("key3DXPos");
descCameraPosition.putDouble (idkeythreeDXPos, posX);
var idkeythreeDYPos = stringIDToTypeID ("key3DYPos");
descCameraPosition.putDouble (idkeythreeDYPos, posY);
var idkeythreeDZPos = stringIDToTypeID ("key3DZPos");
descCameraPosition.putDouble (idkeythreeDZPos, posZ);
var idkeythreeDXAngle = stringIDToTypeID ("key3DXAngle");
descCameraPosition.putDouble (idkeythreeDXAngle, angleX);
var idkeythreeDYAngle = stringIDToTypeID ("key3DYAngle");
descCameraPosition.putDouble (idkeythreeDYAngle, angleY);
var idkeythreeDZAngle = stringIDToTypeID ("key3DZAngle");
descCameraPosition.putDouble (idkeythreeDZAngle, angleZ);
descCamera.putObject (idKey3DCurrentCameraPosition,
(idKey3DCurrentCameraPosition, descCameraPosition);
These must be defined in the ActionDescriptor to make it work,// , but we do not have them
var idkeythreeDCurrentFStop = stringIDToTypeID ("key3DCurrentFStop");
descCamera.putDouble (idkeythreeDCurrentFStop, 0.000000);
var idkeythreeDCurrentFDist = stringIDToTypeID ("key3DCurrentFDist");
descCamera.putDouble (idkeythreeDCurrentFDist, 0.500000);
var idkeythreeDCurrentFocalPointX = stringIDToTypeID ("key3DCurrentFocalPointX");
descCamera.putDouble (idkeythreeDCurrentFocalPointX, 0.500000);
var idkeythreeDCurrentFocalPointY = stringIDToTypeID ("key3DCurrentFocalPointY");
descCamera.putDouble (idkeythreeDCurrentFocalPointY, 0.500000);
var idkeythreeDCurrentFOV = stringIDToTypeID ("key3DCurrentFOV");
descCamera.putDouble (idkeythreeDCurrentFOV, 30.000000);
var idkeythreeDOrthographic = stringIDToTypeID ("key3DOrthographic");
descCamera.putBoolean (idkeythreeDOrthographic, false);
var idkeythreeDOrthographicScale = stringIDToTypeID ("key3DOrthographicScale");
descCamera.putDouble (idkeythreeDOrthographicScale, 6.928203);
var idkeythreeDViewIndexString = stringIDToTypeID ("key3DViewIndexString");
descCamera.putString (idkeythreeDViewIndexString, "");var / / desc = executeAction (idSet3DCamera, descCamera, DialogModes.ALL);
return of ESCR;
}< code >
The problem is that it does not work unless you also set the lower elements. I want to leave what they are currently defined, but I don't know how to get these values. Apart from that, I'll get the values of position of camera beforehand. 9 ID, string or otherwise, this should be necessary are known from the top.
I assume you are using something like:
< code >
Var ref = new ActionReference();
ref.putIndex (idkeythreeDCurrentFStop, idkeythreeDCurrentFStop);
var / / desc = executeActionGet (ref);
< code >However, I was unable to get something to work. I am not sure
- That of the putXXX method to use.
- What to use for the desiredClass, which is the first argument.
Any help would be appreciated.
That you will get the 3DCurrentCameraPositon
var ref = new ActionReference(); ref.putEnumerated( zTID("Lyr "), zTID("Ordn"), zTID("Trgt") ); var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('layer3D')).getObjectValue(stringIDToTypeID('key3DState')).getObjectValue(stringIDToTypeID('key3DCurrentCameraPosition'));
Which returns a descriptor with the following keys.
Key 0 = key3DXPos: DescValueType.DOUBLETYPE
1 key = key3DYPos: DescValueType.DOUBLETYPE
2 = key3DZPos key: DescValueType.DOUBLETYPE
3 = key3DXAngle key: DescValueType.DOUBLETYPE
Key 4 = key3DYAngle: DescValueType.DOUBLETYPE
5 = key3DZAngle key: DescValueType.DOUBLETYPEAt least with my sample 3D layer. I don't really do a lot with the 3D, so there may be other keys.
-
How to get and set values a HSlider
Hello
I haven't used flex for a while and I'm a little slow today. My question is simple: how to get and set my HSlider values in a class. My HSlider lives in an mxml file and class lives in a separate actionscript file. First of all, I want to get the value of the hslider. I use property change in the hslider to call a method in my class called Update(. ) In my class, I have the function called Update() and Interior using the id of the cursor to get the value of it. The compiler is complainiing of 1120: access of undefined property hslider. I gave an example of pseudocode below:
MXML
< mx:HSlider id = minimum "hslider" = "0" maximum = "100" value = "100" dataTipPlacement = 'top' tickColor = '0 x 323232 '.
snapInterval = "1" tickInterval = '10' allowTrackClick = "true".
liveDragging = "true" change = "aClass.Update ()" / > "as file
public void Update (): void {}
myVar = hslider.value / 100.0;
}Think how and then set the value of the hslider?
Maybe the update to this other file function must accept a parameter of the event and then you can probably get this value from the event
or maybe give the function a parameter of the cursor
change = "AClass.Update (hslider.value)" "
public void Update(value:int):void {}
myVar = value / 100.0;
} -
I use lv 8.5 and teststand 4.0.
I did a step type custom and recorded at the MyTypes.ini in pallets of type.
I specified a default module by opening the properties of the custom step of *.ini type window, then I put some values of the parameters.
T1) when I open teststand and I add the custom step type manaully in seq file, the labview module parameter values are represented.
But, if to use file (create and add support prototype stage), the labview module parameter values has the default value.
Using joint file, how to get the setting custom step type values I put in *.ini?
Q2) each type of step are automatically by name through the use of LoadTypePaletteFilesEx. When I open teststand and I add the custom step type manaully in seq file, the module is loaded automatically. Inside the attachment, I use a prototype of charge and a fixed path where the module labview is to load the labview module.
Can I load module automatically without using a prototype of charge or how can I get a dynamic path of type step?
I solved Q1 for myself by using the mapping tab of the parameter within the configuration to the default module window.
Everyone knows Q2?
Thank you.
Maybe you are looking for
-
Hi I office365 active minutes, both in my Skype (on the web shows) and in my account from microsoft (Office. com\myaccount), but when I want to call a number from Skype on my PC or phone application. It says that I need to buy a credit first. And in
-
P7-1414: Error Code expose @ boot
We have a PC model P7-1414 and I recently notice, when the PC am top display 511-CPU and below the black screen, I see brackets between them he said press F1 the CPU t - he no rotation continues and begins to choke, but the fan will run continions is
-
Always get error network on bike E, a few times and another Sim 1 works does'nt work. A help for this error can cause on the bike?
-
How can I put Games downloaded on a disk
I bought a few online games, they have been downloaded through gambling house and Amazon that I played the last we bought a box out by saying that I didn't have enough video memory, it disappeared I continued the game then, the game froze it would no
-
Can someone help me to go with my new printer. I'm unable to go ahead with the HP Installer. Message error "fatal error occurred...". » Download Driver on the hp site does not. Have done the following: 1 deleted everything about previous printer 2