Skip to content

Tag: select

SQL Informix advanced query

Let me try to explain what I want to do with my data. Structure of my data is as follows: I have 3 columns: date, id, and stage. Stages can be different numbers, but I’m interested in showing specific transition of some id from stage -1 to stage 1. Please see the example below. I have an id that was

Get TOP 1 row from multiple tables based on date

I have five tables in a SQL Server database. These tables are listed below and I want to select Data from these tables according to date. I tried searching but could not find solution for multiple tables. Please help TABLE1 TABLE2 TABLE3 TABLE4 TABLE5 I want to select Label and Date from Table 3, 4 and 5 wher…

Query to check if MySQL database is connected

I am wondering if there is a best practice or standard query used to check if a MySQL database is still connected? I was originally thinking of performing a simple search in one of my tables, which will confirm if the database is still there. Just wondering if there is a better approach. Answer No need to act…