Relative Content

Tag Archive for sqloracle

How to get rid of 0 values from extract, as I think it’s causing first and last row to aggregate and give false rows in Oracle?

What I am wanting to do, for each employee, is to get the difference between their clockin, and their next respective clockin in hours, and I am utilizing lag. The problem is, the below select gives me the resulting extract(single employee), and I think the 0/zero row is causing the issue, and also causing a false row(s) when I pull multiple employees(second extract screenshot).

Create age group column from birthday

I’m trying to create an age calculation column from a birthdate, and then create an age-group column based on the age column. I’ve done some searching, but all the results I can find are structured differently enough that I’m not sure I’m even approaching this in the correct way.
The query is this:

How to return lowest result from sequence column

I’m new to learning oracle sql, so I’m sure this has a simple solution that I’m missing, but I’m trying to return the first sequence row from each order, not just limit the whole query results to 1 returned row. The query I’m working with is this:

Filtering Croatian Plate Numbers on Oracle SQL

So, I have a list of plate numbers from different countries. If I want to filter Croatian plates, how can I do that? Croatian plate formats are like ZG 000-A, ZG 000-AA, ZG 0000-A or ZG 0000-AA. (Ignore the dashes)