sql server – Count number of time in sql

I have two tables , ‘Checkpoint-table Movement and ‘Station‘. Now i want to count, number of times PNR(unit of a vehicle per each station) has passed between 06:00-20:00pm today(Date Time Passed record) to Station Description record(M100-M700). How can i do this using below sql tables?

// Two tables
SELECT TOP 1000 (Plant Code)
      ,(Production Year)
      ,(Model Code)
      ,(Transaction Code)
      ,(DateTime Passed)
      ,(Hold Get)
      ,(Option Code 1)
      ,(EQS Carstate)
  FROM (Tracking_Server_DB).(dbo).(Checkpoint Movement)

SELECT TOP 1000 (Station Code)
      ,(Machine Name)
      ,(Station Description)
      ,(IP Address)
      ,(Tracking Client Name)
      ,(Previous Station Code)
      ,(Next Station Code)
      ,(Transaction Code)
  FROM (Tracking_Server_DB).(dbo).(TS_Station)

generate report of total count from drop down data list in google sheet

I have created a google sheet to enter data of a hospital. One of the column is ‘GENDER‘ where I have created drop down using data validation -> list of items and the items are (M,F) and similarly I have created another drop down value for the column ‘CASES‘ where values are (NORMAL CORONA,DISCHARGED,DIED,ISOLATION,VENTILATOR,COMA). Health workers will input data in this sheet. I have neglected other columns.
Sample columns in the sheet (first tab named ‘data‘) are:


Now in another tab, I have to give the aggregate report of the hospital patient. The structure of the aggregate report will be:


How can I create a report in google sheet from the drop down data list which shows total number of M/F gender count for the different CASES.

formulas – Need to count unique occurrences past 365 days from date of service google sheets

Assuming that account names are in sheet Visits column A2:A, and dates are in B2:K, try Insert > New sheet and this formula in cell A1 of the new sheet:

        Visits!B2:K >= today() - 365, 
    "select Col1, count(Col1) 
     where Col1 is not null 
     group by Col1 
     label Col1 'date' ", 

Format column A as Format > Number > Date.

Poly Count in Unity games. 3d Asset detail

enter image description here

I’ve begun making my own characters for my games. These are just tests that I copied from other references (ie. Cartoons TV etc). I used Maya with the ‘Convert Smooth Preview To Polygons’ to make the mesh nice and smooth.

However upon importing to Unity, perhaps I am wrong, but the number of polys looks way higher than models I just downloaded from Unity Store etc.

If I continue making ALL my assets in this detail, would the game run ok. (I’m targeting PC, not mobile phones. And I don’t mind if low end pcs struggle but anything mid-range and up.)

Should this detail be ok and I can focus on my game dev? Or should I spend some more time trying to reduce the poly count on my models (without compromising too much detail)?


unreal 4 – How can I add these bones to my meta human? Or is there a way I can make virtual bones count when retargetting?

Paid for animations thinking they would be fine and they mostly are but… the hands are using these IK bones that I do not have. Is there a way I can add the bones to my meta skeleton within unreal? I tried creating virtual bones but they dont seem to come up in the retarget manager 🙁 Also, I can only seem to add one virtual bone to the root whereas both the foot and hand IK root bones are parented to the root bone here.

enter image description here

Any help would be massively appreciated!


Buen día, intento hacer una consulta en sql server , la consulta es mostrar la cantidad de empleados que se encuentran laborando en un departamento, y funciona pero en la columna de Cantidad empleados que es mayor a 0 me duplica el registro.



SELECT D.idDepartamento, D.Nombre_del_Departamento, COALESCE (COUNT( E.IdPuesto),0) AS Cantidad_de_Empleados FROM Departamentos as D
INNER JOIN Puesto as P ON D.idDepartamento=P.idDepartamento LEFT JOIN Empleados as E ON E.IdPuesto=P.idPuesto
GROUP BY  D.idDepartamento,D.Nombre_del_Departamento,E.IdPuesto 

“Count” from unspecified starting points in google sheets

I’m a baseball coach creating a google sheet to help track pitches and results for my college guys during games so they can see a lot of different information. See attached picture.

I’d like the chart to autofill the “count” column. Not sure how to do that with unspecified starting and ending points. Also, the count will only ever be up to 3-2. Even if there is another foul ball, the count still stays at 3-2. After an end of the at bat “result” (such as “line hit” or “BB”) is selected, I’d like the count to reset to “0-0” and a new “At Bat” is listed. Again, not at all certain if this is even possible without definite starting and ending points.

I could also reformat the cells to be a single cell and have it just be text that populates the cell. Not sure if that would be any easier/better to deal with only one cell instead of two.

Thanks for your help.


postgresql – Cumulate count between date with 0 when there are records for a given day

How could one write a Postgresql query that gives both daily and cumulative counts without gaps? E.g. if there is no data for a given day, it would show 0 as a daily count for that that day and the same cumulative sum as the previous day?

I think I’d need GENERATE_SERIES, but I don’t know how to do it. I’m also not entirely sure if order by day asc rows between unbounded preceding and current row would work correctly always, but maybe not the biggest issue here.

I have tried to craft the query with PARTITION BY and

Let’s say I write a table and add data such as

create table test
    data int4,  
    created_at timestamptz NOT NULL DEFAULT now()

insert into test(data, created_at) values(1, '2021-04-01');
insert into test(data, created_at) values(2, '2021-04-01');
insert into test(data, created_at) values(3, '2021-04-02');
insert into test(data, created_at) values(4, '2021-04-03');
insert into test(data, created_at) values(5, '2021-04-05');
insert into test(data, created_at) values(6, '2021-04-07');

and then create a queries such as

  created_at as "Date",
  count(1) as "Daily count"
FROM test
WHERE created_at >= '2021-04-01'
  AND created_at <= '2021-04-30'


Date Daily count
2021-04-01 00:00:00 2
2021-04-02 00:00:00 1
2021-04-03 00:00:00 1
2021-04-05 00:00:00 1
2021-04-07 00:00:00 1
with data as (
    date_trunc('day', created_at) as day,
  from test
  group by 1
  running_total(count) over (order by day asc rows between unbounded preceding and current row)
from data
day running_total
2021-04-01 00:00:00 2
2021-04-02 00:00:00 3
2021-04-03 00:00:00 4
2021-04-05 00:00:00 5
2021-04-07 00:00:00 6

But as noted, how could these two be combined without gaps on daily values? Somehow it feels I get close but bump into some (syntax) problem. Maybe those two queries are the simplest and cleanest examples of what I’m thinking.

office 365 – How do I setup an online Office365 form to allow my staff to count tasks and input a number and have it report to a sharepoint spreadsheet?

I have a team of people that count and record tasks daily. They are counting things like mail received (in lbs.), number of client contacts, number of system errors corrected.

I’m trying to figure how how to make an online form, preferably something I can use in Office365 so that they can enter this data easily, by just typing in the number in the correct field and hitting “submit”

I would like this to all appear in a sharepoint spreadsheet in which the columns are the tasks handled, and the rows are the dates. Any help would be greatly appreciated.