Questions tagged [analytical]

70 questions
6
votes
1 answer

How to use Analytic/Window Functions in Spark Java?

I'm trying to use analytical/window function last_value in Spark Java. Netezza Query: select sno, name, addr1, addr2, run_dt, last_value(addr1 ignore nulls) over (partition by sno, name, addr1, addr2, run_dt order by beg_ts , end_ts rows between…
ND User
  • 129
  • 3
  • 7
5
votes
1 answer

How to find the smallest N dimensional simplex from a set of points that contains a given point?

I've looked all over google and stack but haven't found an answer to this problem yet. I keep finding results relating to the simplex method or results for finding the smallest arbitrary simplex (i.e. the vertices are not constrained). Neither can I…
4
votes
1 answer

How to spread boxes on into another box in non-iterative manner?

So I have boxes of different sizes (squares). I have a Big Box (not a square). I have no guarantee that all of my boxes will fit, yet I need to try to fit as much as possible in a non-iterative manner without overlap. What algorithm allows for such…
DuckQueen
  • 48
  • 6
  • 46
  • 109
3
votes
4 answers

Reconstruct historical table rows, based only on change-log data

I'm working on some complex sales analytics, which is very convoluted ... and boring ... So for this question I'll use a fun, sugary metaphor: vending machines. But my actual tables are structured the same way. (You can assume there's plenty of…
Giffyguy
  • 17,946
  • 30
  • 81
  • 147
3
votes
1 answer

C++: Extracting symbols/variables of an analytical mathematical expression

I have expressions that can be provided by the user, such as: a*sin(w*t) a+b/c x^2+y^2/2 And I would like to just get the list of variables there. I don't need to do any substitutions. So, for the first formula it's gonna be {a,w,t}. For the…
The Quantum Physicist
  • 21,050
  • 13
  • 77
  • 143
3
votes
1 answer

OrientDB and OLAP?

What is the status of OrientDB support for higher level structures such as cube cells, dimensions, OLAP/BI in general? Analytical functions/window functions? These are common in high-end databases (Oracle, MSSQL, Postgres). Thanks.
Hristo Stoyanov
  • 1,119
  • 3
  • 10
  • 21
2
votes
2 answers

Develop multilingual system

This is more of an analytical question. I need to know how best to make a multilingual system, a.k.a. a system where the user can change the language. The language will be stored in a cookie or a database. I've worked in the past with different…
RobinJ
  • 4,186
  • 7
  • 30
  • 56
2
votes
3 answers

Snowflake Analytical Query Design

I have a tricky query design requirement, i have tried different types/different combination of Analytical function to achieve my result from the below data set. My other plan is do write stored proc, however i want to reach out to the expert group…
2
votes
2 answers

Fast way to find corresponding objects across stereo views

Thanks for taking your time to read this. We have fixed stereo pairs of cameras looking into a closed volume. We know the dimensions of the volume and have the intrinsic and extrinsic calibration values for the camera pairs. The objective being to…
2
votes
2 answers

Oracle analytical function

I have similar problem. Can you anyone give me solution. Below is the table value 10 20 30 40 I want output like this 10 10-2 8 20 20-8 12 30 30-12 18 40 40-18 22 Sort by ascending and…
Bala
  • 21
  • 1
2
votes
1 answer

Oracle SQL - Most purchased item in past 6 months for each row

I have data in the following format: date fruit ====================== 1-jan-14 orange 3-jan-14 orange 1-may-14 orange 2-may-14 apple 3-may-14 apple 1-aug-14 pineapple 2-aug-14 apple I want to add a column which will…
AYR
  • 950
  • 3
  • 11
  • 22
2
votes
3 answers

SQL - Row Sequencing

I have a table play day with following columns date_played, winner, loser with following values, (Jun-03-14, USA, China) (Jun-05-14, USA, Russia) (Jun-06-14, France, Germany) . . . . (Jun-09-14, USA, Russia) I need to obtain all instances where USA…
paddu
  • 591
  • 5
  • 19
2
votes
4 answers

Need algorithm for Sequence calculation

I am trying to find the solution for a problem where i have something like A > B B > C B > D C > D And I should get the answer as A > B > C > D. Conditions for this problem The output will involve all the elements. The problem will not have any…
bragboy
  • 32,353
  • 29
  • 101
  • 167
1
vote
2 answers

Rank function with complex scenario

I have a TAble TABLE1 and having columns like ID, Status and Code BAsed on the code priority i want the output , the priority is SS -> RR - > TT - > AA ( these priority is not stored in any tables) Query should first look for Approved status then…
Ram
  • 39
  • 5
1
vote
2 answers

Oracle Analytical Function?

For the given table below, how can we find the customer whose name appears 3 times consecutively. +---------+-----------+ | CUST_ID | CUST_NAME | +---------+-----------+ | 1 | SAM | +---------+-----------+ | 2 | SAM …
Novice_Techie
  • 384
  • 2
  • 7
  • 16
1
2 3 4 5