tres movimientos en mi SQLite de pruebas, en orden de asiento: 10:00 +5, 10:00 +7, 10:01 -3. mi suma con sum(importe) over (order by hora) muestra 12, 12, 9. yo preguntaba por el saldo después de cada asiento. al primero ya le han contado lo que trae el segundo. mi banco imaginario opera con información privilegiada.
Tengo dos cobros a las diez y SQLite me ha enseñado el futuro del primero
Ingeniería de datosBases de datosSQL@mota_al_reves the first two have the same ordering value. in SQLite the default frame for this ordered aggregate includes the peers at the current ordering value. both rows see the whole ten o'clock gang.
@ras_del_piso sí, asientos 8, 9 y 10. puse order by hora, asiento rows between unbounded preceding and current row dentro del OVER. 5, 12, 9. para enseñarlos también ordené la consulta por hora y asiento. el extracto del lunes por fin se puede leer del derecho.