extract only single value from multiple rows based on certain condition for same id in Oracle

I’m oracle beginner, and I’m having trouble shooting the below issue –

My table is –

+——-+——+——-+—— + | ID | GRP | ITDESC| DEN |
+——-+——+——-+—— + | 12345 | MANX | Apple | SendV | +——-+——+——-+—— + | 12345 | MANX | Apple | Manual| +——-+——+——-+——- | 12345 | MANX | Apple | UnVeri| +——-+——+——-+—— + | 12346 | MANX | Mango | UnVeri| +——-+——+——-+—— + | 12347 | MANX | PineAp| SendV| +——-+——+——-+—— + 12348 | MANX | Pine | Manual|

I am expecting –

+——-+——+——-+—— + | ID | GRP | ITDESC| DEN |
+——-+——+——-+—— + | 12345 | MANX | Apple | SendV | +——-+——+——-+—— + | 12346 | MANX | Mango | UnVeri| +——-+——+——-+—— + | 12347 | MANX | PineAp| SendV| +——-+——+——-+—— + | 12348 | MANX | Pine | Manual| +——-+——+——-+—— +

I have multiple rows that has only the DEN column different for the same id. My aim is – for the same id perform the check – If the Value of DEN is ‘Manual’ then check to see if there is ‘SendV’ in DEN column for that id. If it is present then consider ‘SendV’ otherwise consider ‘Manual’. Note in the provided example, the order is a random, the SendV can be in 2nd row or 3rd row or 4th row based on the action, however the text of DEN will be same as said above.

select * from table t1 where DEN IN (‘Manual’, ‘SendV’) .I am not aware how to write the condition??

Any suggestions/oracle query help is welcome.

Hyperbolic Second Order PDE – boundary condition with sinusoid

This is similar to countless PDE equations, but the error seems specific to my case:

I’m trying to solve a hyperbolic PDE, where $ U=(x,t)$ and $ V=(x,t)$ :

The system represents a piezoelectric beam in quasi-static assumptions: $ $ \rho\frac{\partial^2 U}{\partial t^2}-\alpha \frac{\partial^2U}{\partial x^2} U=0$ $ with BCs: $ $ U(0,t)=0; \quad \alpha\frac{\partial U}{\partial x}(L,t)=\frac{\gamma V(t)}{h}$ $ and ICs: $ $ U(x,0)=0\quad\frac{\partial U}{\partial x}(x,0)=0$ $

The error I get seems related to the boundary condition since it is represents a voltage applied:

NDSolveValue::deqn: Equation or list of equations expected instead of 0 in the first argument {0,0,-(Sin[20 \[Pi] t]/1000000000),0,0}. 

It seems like a straight forward solution, and my code:

ClearAll[U, V] alpha = 12.1*10^10; gamma = 10*10^-12; rho = 7850; freq = 10; omega =   2 Pi freq; Volt = 100; L = 3; T = 30; h = 1; System = {rho D[U[x, t], t, t] - alpha D[U[x, t], x, x] = 0,    U[x, t] = 0 /. x -> 0,    alpha1 D[U[x, t], x] = -gamma/h Volt Sin[omega t] /. x -> L,    U[x, t] = 0 /. t -> 0,    D[U[x, t], t] = 0 /. t -> 0    }; {U} = NDSolveValue[System, {U}, {x, 0, L}, {t, 0, T}]  Plot3D[{U[x, t], V[x, t]}, {x, 0, L}, {t, 0, T}] ``` 

Can you cast greater restoration to cure an unknown condition?

The description for Greater Restoration is:

You imbue a creature you touch with positive energy to undo a debilitating effect. You can reduce the target’s exhaustion level by one, or end one of the following effects on the target:

One effect that charmed or petrified the target

One curse, including the target’s attunement to a cursed magic item

Any reduction to one of the target’s ability scores

One effect reducing the target’s hit point maximum

Some of these can be known effects (exhaustion, hit point maximum, etc.) while some may not be known to the caster (charm, curse). Do you have to be explicit when casting Greater Restoration about what effect you are curing, or can you do it “just in case”?

Error while giving initial condition in NDSolve

I am trying to solve following differential equation $ $ \frac{d^2y}{dx^2}+(a+b \frac{2}{\pi}\tan^{-1} x)y=0$ $ with the initial condition $ y(-10)=e^{10i\sqrt{a+b}}$ and $ y'(-10)=-i\sqrt{a+b}e^{10i\sqrt{a+b}}$ .

To implement it I write the following code

s = ParametricNDSolve[{y''[x] + (a + b (2 + 2/Pi ArcTan[x])) y[x] ==  0, y[-10] = Exp[I 10 Sqrt[a + b]], y'[-10] = -I Sqrt[ a + b]*Exp[ I 10 Sqrt[a + b]] }, y, {x, -10, 10}, {a, b}] 

But I am getting an error that ParamatericNDSolve expects equation or list of equations instead of $ e^{10i\sqrt{a+b}}$ in the first argument. Can anyone point me out where am I making the mistake?

Trouble implementing outflow boundary condition when trying to solve a pde using NDSolve

Trying to solve the following pde: $ \partial_{t}y + c\partial_{c}y = 0$ (for simplicity $ c=1$ ).

For the initial data I am using a Gaussian. The problem surges when I am trying to implement the outflow boundary condition as it was suggested to me, namely $ \frac{\partial{y}}{\partial{t}} =0$ at $ x =0$ .

So far my code is pretty simple:

 v = 1 ; L = 2;   With[{y = y[t, x]},   eq = D[y, t] + vD[y, x] == 0;  ic = y == Exp[-x^2] /. t -> 0;  bc = {D[y, x] == 0 /. x -> 0 }];    mol[n_Integer, o_: "Pseudospectral"] := {"MethodOfLines",   "SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> n,   "MinPoints" -> n, "DifferenceOrder" -> o}};   sol = NDSolveValue[{eq, ic, bc}, y, {t, 0, 1}, {x, 0, L},   Method -> mol[100, 4]];  {t0, tend} = sol["Domain"][[1]];   Manipulate[  Plot[sol[t, x], {x, 0, L}, PlotRange -> {-10, 10}], {t, 0, tend}]; 

It stems from answers to questions previously asked here, and I intend later to test finite difference methods (BTCS/FTCS) as done in Schemes for nonlinear advection equation.

However I am not being able to evolve the equation do to confusion when trying to implement the BC, I get the following:

  NDSolveValue: Boundary condition $  y^{(0,1)}[t,0]$   should have derivatives of order lower than the differential order of the partial    differential equation.  

This is expected as I am not sure what would be the best way to impose BC on the problem.

If anyone has any suggestions they would be welcolmed.


Is an Immune creature considered to have the condition without suffering its effects?

In this question asking about a homebrew mechanic involving exhaustion, the accepted answer points out an exploit using a moon druid’s combat wildshape – Taking the form of an elemental would avoid the downsides of the mechanic as elementals are immune to exhaustion. The answer then goes on to suggest that the druid would need to have greater restoration cast on her to remove enough levels of exhaution before the wildshape was dropped that the druid does not die outright.

Unless I’ve missed it, there isn’t a specific definition for “immunity” within the rules, so we must read that word with its regular meaning in English. In particular, creatures are listed as being immune to the condition itself, not to the effects of the condition (or “asymptomatic” or a “carrier” of the condition or similar language).

The case in the linked question is even more complicated because exhaustion has multiple levels:

If an already exhausted creature suffers another effect that causes exhaustion, its current level of exhaustion increases by the amount specified in the effect’s description.

As such, my reading is that since the element is immune to the exhausted condition, this clause would never trigger – the elemental cannot be an ‘exhausted creature’.

Is this interpretation correct, or is the condition applied but ignored? (And particularly, could elementals gain multiple levels of exhaustion whilst being immune to the condition, for the purposes of ending wildshape for example?)