sql
stringlengths
6
1.05M
<reponame>spiliti/boma create or replace function loadincrementalcollectionindex() returns void as $$ declare incrheader record; v_ulbname varchar(50); v_districtname varchar(50); v_regionname varchar(50); v_rcptheadid bigint; v_temp bigint; begin select name, districtname, regionname into v_ulbname, v_distr...
CREATE TABLE IF NOT EXISTS `comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(40) NOT NULL, `email` varchar(60) NOT NULL, `comment` text NOT NULL, `id_post` int(11) NOT NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) );
<reponame>LukasSandm/dbt_artifacts {{ config( materialized='incremental', unique_key='manifest_source_id' ) }} with dbt_nodes as ( select * from {{ ref('stg_dbt__nodes') }} ), dbt_sources_incremental as ( select * from dbt_nodes where resource_type = 'source' {% if is_incremental() %} ...
<reponame>mythoss/midpoint /* * Copyright (C) 2010-2022 Evolveum and contributors * * This work is dual-licensed under the Apache License 2.0 * and European Union Public License. See LICENSE file for details. */ -- @formatter:off because of terribly unreliable IDEA reformat for SQL -- This is the update script fo...
<reponame>wlw330296385/holiday<filename>data/holiday.sql /* Navicat Premium Data Transfer Source Server : root Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Source Schema : holiday Target Server Type : MySQL Target Server Versio...
<reponame>darknegma/docker-airflow -- UPDATE PLAN -- 3 TABLES ARE BEING USED BY DBT -- 2 NO_PII TABLES - CREATE THE INDIVIDUAL READ ROLES FOR THESE -- 1 PII TABLE-- 1 VIEWS NEEDED -- ADD THE read ROLES TO THE NO_PII GROUP ROLE -- ADD THE NO_PII GROUP ROLE TO BOTH DBT ROLES --RAW.STITCH_TYPEFORM.ANSWERS --RAW.STITCH_T...
<reponame>zettadb/zettalib<gh_stars>0 -- drop table with cascade constraints drop table foo.bar cascade constraints
<filename>class_3/window_function.sql #Ranks #Build on top of the previous query and rank films by length within the rating category (filter out the rows that #have nulls or 0s in length column). #In your output, only select the columns title, length, rating and the rank. select title, length, RANK() over (order by ...
set client_min_messages to warning; create extension if not exists pgtap; reset client_min_messages; begin; select plan(11); select has_function( 'ggircs_portal_private', 'ensure_window_open_submit_application_status', 'Function ensure_window_open_submit_application_status should exist' ); alter table ggircs_por...
<gh_stars>1-10 ---------------------------------------- -- User ---------------------------------------- create user sioinv; alter user sioinv add token python_inv_script ;
select -- Required Columns s.id as resource, case when s.geo_redundant_backup_enabled = 'Enabled' then 'ok' else 'alarm' end as status, case when s.geo_redundant_backup_enabled = 'Enabled' then s.title || ' geo-redundant backup enabled.' else s.title || ' geo-redundant backup disabled.' end ...
ALTER TABLE tokenaccount RENAME COLUMN identity TO key;
--github.com/imsunnyjha select*from city where id=1661;
<reponame>DrazenDodik/redshiftsample<filename>query.sql SELECT buyerid, qtysold FROM sales, date WHERE sales.dateid = date.dateid AND caldate = '2008-01-05';
<filename>Seed.sql  use SecondHand SET IDENTITY_INSERT [dbo].[Categorias] ON INSERT INTO [dbo].[Categorias] ([CategoriaId], [Nome]) VALUES (1, N'Eletrônicos') INSERT INTO [dbo].[Categorias] ([CategoriaId], [Nome]) VALUES (2, N'Móveis') INSERT INTO [dbo].[Categorias] ([CategoriaId], [Nome]) VALUES (3, N'Esportes') I...
<reponame>estafette/estafette-ci-db-migrator -- +goose Up -- SQL in this section is executed when the migration is applied. CREATE INDEX builds_get_pipeline_builds_idx ON builds (repo_source, repo_owner, repo_name, inserted_at DESC); -- +goose Down -- SQL in this section is executed when the migration is rolled back.
CREATE TABLE GENRE( [GENRE_ID] [nchar](100) NOT NULL, [GENRE_NAME] [nchar](100) NOT NULL )
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 13, 2020 at 03:09 PM -- Server version: 10.1.22-MariaDB -- PHP Version: 7.0.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<reponame>joelonsql/ccms CREATE TABLE BedTypes ( BedTypeID integer NOT NULL GENERATED ALWAYS AS IDENTITY, BedType text NOT NULL, PRIMARY KEY (BedTypeID), UNIQUE (BedType) );
CREATE OR REPLACE VIEW high_rating AS SELECT DISTINCT name FROM actors a, movies m WHERE a.mid = m.mid AND m.rating >= 4; SELECT COUNT(*) FROM high_rating; CREATE OR REPLACE VIEW low_rating AS SELECT DISTINCT name FROM actors a, movies m WHERE a.mid = m.mid AND m.rating < 4; SELECT COUNT(*)...
-- Insert new apps and init their version history WITH app_new AS ( INSERT INTO appstore_app( ext_id, store_app_id, name, description, store_url, dev_id, dev_name, dev_url, supported_devices, screenshot_urls, screenshot_dimensions, ipad_screenshot_urls, ipad_screenshot_dimensions, artwork_smal...
------------------------------------------------------------------------------------------------------------------ -------------------- imaptools reverse geocoder prep intersections ----------------------------------------------- ------------------------------------------------------------------------------------------...
<reponame>kylekelly/estimator<gh_stars>10-100 CREATE TABLE tasks ( "id" UUID PRIMARY KEY, "projectId" UUID DEFAULT NULL REFERENCES tasks (id) ON DELETE CASCADE, "parentId" UUID DEFAULT NULL REFERENCES tasks (id) ON DELETE CASCADE, "ordering" INT NOT NULL DEFAULT 0, "title" TEXT NOT NULL D...
ALTER TABLE POLICY ADD COLUMN LEGAL_BASES_INHERITED BOOLEAN; UPDATE POLICY SET LEGAL_BASES_INHERITED = FALSE WHERE LEGAL_BASES_INHERITED IS NULL; ALTER TABLE POLICY ALTER COLUMN LEGAL_BASES_INHERITED SET NOT NULL;
<reponame>Shuttl-Tech/antlr_psql -- file:create_type.sql ln:51 expect:true CREATE FUNCTION int42_out(int42) RETURNS cstring AS 'int4out' LANGUAGE internal STRICT IMMUTABLE
<reponame>MinCiencia/ECQQ CREATE VIEW total_dialogos_nna AS SELECT DISTINCT id_mesa, cantidad_participantes, rango_edades_id, region_name, region_iso FROM necesidades_nna;
-- -- Brymo Tech -- Databaze fudmadropbox -- -- -- CREATING TABLE MEMBERS -- CREATE TABLE IF NOT EXISTS `members` ( `memberId` int(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, `userName` varchar(25) NOT NULL UNIQUE KEY, `accessKey` varchar(80) NOT NULL, `fullName` varchar(30) NOT NULL, `address` varchar(200) NO...
USE gasolinea; DROP TABLE IF EXISTS mexGasPrice; DROP TABLE IF EXISTS mexGasStation; DROP TABLE IF EXISTS usaGasPrice; DROP TABLE IF EXISTS gasType; DROP TABLE IF EXISTS municipio; DROP TABLE IF EXISTS exchangeRate; CREATE TABLE exchangeRate ( exchangeDate DATETIME NOT NULL, exchangeRate DECIMAL(9,6) NOT NULL, ...
-- DB Migration from release 3.85.0 to 3.86.0 -- Adding ExecutionSource column in execution_flows alter table execution_flows add column execution_source varchar(32) default null;
<filename>webserver/app-moe/sql/Archive/3.2.x/3.2.3/PHPOE-2103/rollback.sql -- staff_leave_attachments DROP TABLE IF EXISTS `staff_leave_attachments`; CREATE TABLE IF NOT EXISTS `staff_leave_attachments` ( `id` int(11) NOT NULL, `name` varchar(250) NOT NULL, `description` varchar(250) NOT NULL, `file_name` varc...
<reponame>xiaosongdeyx001/shujuku-----123 INSERT INTO `goods_brand_tb` VALUES (60, NULL, '肯德基', 'K', 'K', 1, 0, 1517021000000005, '1517021000000005,1517021000000006,', 1517021000000006, 'wd', '2017-2-27 09:42:41', 1517021000000006, 'wd', '2017-2-27 09:42:03', NULL, NULL, NULL); INSERT INTO `goods_brand_tb` VALUES (61, ...
<reponame>goware/pgkit<filename>tests/testdata/pgkit_test_db.sql CREATE TABLE accounts ( id SERIAL PRIMARY KEY, name VARCHAR(255), disabled BOOLEAN, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL ); CREATE TABLE reviews ( id SERIAL PRIMARY KEY, -- article_id integer, name VARCHAR(...
<gh_stars>1000+ 19944 1 19944 19256 19940 1 19940 15 19940 16 19940 17 19940 18 19940 19252 19938 1 19938 19250 19937 1 19937 15 19937 16 19937 17 19937 18 19937 19249 19936 1 19936 15 19936 16 19936 17 19936 18 19936 19248 19934 1 19934 19246 19932 1 19932 19244 19930 1 19930 19242 19929 1 19929 19241 19928 1 19928 19...
<filename>install/create_database_mysql.sql -- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 10.1.19-MariaDB - mariadb.org binary distribution -- OS do Servidor: Win32 -- HeidiSQL Versão: 9.4.0.5125 -- ----...
<reponame>hyoklee/hdf5 HDF5 "tbitnopaque.h5" { GROUP "/" { GROUP "bittypetests" { DATASET "bitfield_1" { DATATYPE H5T_STD_B8LE DATASPACE SIMPLE { ( 32 ) / ( 32 ) } DATA { (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, (10): 0xf5, 0xf4, 0xf3, 0xf2...
SELECT ctl_establecimiento.nombre, enf_dosis_esquema_vac.fecha_dosis_esq, enf_ctl_tipo_componente.nombre_componente1, enf_dosis_esquema_vac.dosis FROM public.ctl_establecimiento, public.enf_componente, public.enf_ctl_tipo_componente, public.enf_dosis_esquema_vac, public.enf_inventar...
select count (*) from ( select distinct docid from frequency where term="law" or term="legal" );
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 05, 2019 at 01:48 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE FUNCTION udf_HoursToComplete(@StartDate DATETIME, @EndDate DATETIME) RETURNS INT AS BEGIN IF @StartDate IS NULL BEGIN RETURN 0 END IF @EndDate IS NULL BEGIN RETURN 0 END RETURN DATEDIFF(HOUR, @StartDate, @EndDate) END
CREATE FUNCTION ufn_GetSalaryLevel (@salary DECIMAL(18,4)) RETURNS NVARCHAR(7) AS BEGIN DECLARE @salaryLevel VARCHAR(7) IF (@Salary < 30000) SET @salaryLevel = 'Low' ELSE IF(@Salary <= 50000) SET @salaryLevel = 'Average' ELSE SET @salaryLevel = 'High' RETURN @salaryLevel END GO SELECT Salary, dbo.ufn_Ge...
<filename>practice/SQL_W_3_Resource/SQL_Join_On_Movies.sql --SQL Exercises, Practice, Solution - JOINS exercises on movie Database --1. From the following tables, write a SQL query to find the name of all --reviewers who have rated their ratings with a NULL value. Return reviewer name. select r.rev_name from revi...
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ BEGIN TRANSACTION SET QUOTED_IDENTIFIER ON SET ARITHABORT ON SET NUMERIC_ROUNDABORT OFF SET CONCAT_NULL_YIELDS_NULL ON SET ANSI_NULLS ON SET ANSI_PADDING ON SET ANSI_W...
<filename>app/sql/statistics-sql/stats-report/addReport.sql INSERT INTO tournament_stat_report(tournament_id, phase_id, report_type, statistics) VALUES (${tournamentId}, ${phaseId}, ${reportType}, ${stats}) RETURNING *;
<filename>package/migrate/fixtures/good/1512662685_second.down.sql select 'second down'
-- cur_month: 当前月的第一天 ALTER TABLE `event_wos` DROP IF EXISTS RANGE PARTITION CAST(MONTHS_SUB("${var:cur_month}", 1) AS STRING) <= VALUES < "${var:cur_month}"; ALTER TABLE `event_wos` ADD IF NOT EXISTS RANGE PARTITION CAST(MONTHS_ADD("${var:cur_month}", 1) AS STRING) <= VALUES < CAST(MONTHS_ADD("${var:cur_month}", 2) ...
Consulta de imóveis que aderiram PRA <NAME> <<EMAIL>> <NAME>; <NAME>;<NAME>;<EMAIL>; Create table proc_sfb.boletim_pra as SELECT cod_estado, idt_resposta_pergunta, count(imovel.idt_imovel) FROM usr_geocar_aplicacao.imovel, usr_geocar_aplicacao.municipio, usr_geocar_aplicacao.resposta_imovel WHERE resp...
<reponame>methylium/NuGetGallery IF OBJECT_ID('[dbo].[ConfirmPackageExported]') IS NOT NULL DROP PROCEDURE [dbo].[ConfirmPackageExported] GO CREATE PROCEDURE [dbo].[ConfirmPackageExported] @PackageId NVARCHAR(128), @DirtyCount INT AS BEGIN DELETE PackageReportDirty WHERE PackageId = @PackageId AND ...
<filename>schema/revert/trigger_functions/organisation_access_approved@v1.0.0-rc.5.sql -- Revert ggircs-portal:trigger_functions/organisation_access_approved from pg begin; drop function ggircs_portal_private.organisation_access_approved; commit;
<filename>packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql<gh_stars>1-10 USE `mso_catalog`; ALTER TABLE HEAT_ENVIRONMENT MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL; ALTER TABLE NETWORK_RECIPE MODIFY COLUMN CREATION_TIMESTAMP ...
-- Revert oak:seedTable_badge from pg BEGIN; TRUNCATE badge, user_has_badge; COMMIT;
<gh_stars>0 -------------------------------------------------------------------- -- --- author: <NAME> --- -- -- --- create date: 2019-10-03 --- -- -- --- description: sending e-mail about long running queries --- -- ----------------------------------------------------------------...
<reponame>Zhaojia2019/cubrid-testcases<filename>sql/_14_mysql_compatibility_2/_04_table_related/_02_alter_change_column/_50_authorization/cases/alter_authorization.sql --+ holdcas on; ---- ALTER TABLE ... CHANGE COLUMN , type change : -- constraints : no constraints -- ordering : no order defined -- name : same name...
<gh_stars>0 -- @testpoint:opengauss关键字preceding(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists preceding; CREATE TABLESPACE preceding RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace preceding; --关键字带双引号,创建成功 drop tablespace if exists "preceding"; CREATE TABLESPACE "preceding" RELATIVE ...
SELECT UNIQUE CASE WHEN NVL(UPPER(stu_serv_rec.bldg), '') = 'CMTR' OR NVL(UPPER(stu_serv_rec.bldg), '') = '' THEN 'Commuter' ELSE 'Resident' END AS residency_status, stu_serv_rec.yr, stu_serv_rec.sess, stu_se...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 15, 2019 at 06:17 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<filename>Src/QueueDb.Sql/dbo/User Defined Types/CvType.sql CREATE TYPE [dbo].[CvType] FROM NVARCHAR (50) NULL;
<filename>frontend-api-develop/internal/platform/db/migrations/20200504102159_create_email_column_organization_table.up.sql ALTER TABLE organizations ADD COLUMN email VARCHAR(100); ALTER TABLE organizations ADD COLUMN email_password VARCHAR(100);
USE ReportService SELECT CONCAT(e.FirstName,' '+e.LastName)AS Name, Count(us.Id)As [Users Number] FROM Employees AS e JOIN Reports AS r ON r.EmployeeId=e.Id JOIN Users AS us ON us.Id=r.UserId GROUP BY CONCAT(e.FirstName,' '+e.LastName) ORDER BY Count(us.Id) DESC, CONCAT(e.FirstName,' '+e.LastName) --Andriana SELECT...
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 08, 2016 at 04:04 AM -- Server version: 5.6.15-log -- PHP Version: 5.5.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
<reponame>segor/zno-opendata CREATE FUNCTION [dbo].[clean_EOName] ( @EOName NVARCHAR(500) ) RETURNS NVARCHAR(500) AS BEGIN RETURN REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( ...
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: vision -- ------------------------------------------------------ -- Server version 5.5.41-0ubuntu0.12.04.1-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=...
<reponame>MrHaber/Dayz-Mod-Server -- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64) -- -- Host: localhost Database: hivemind -- ------------------------------------------------------ -- Server version 5.5.62-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACT...
<gh_stars>1-10 CREATE DATABASE IF NOT EXISTS `neon` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `neon`; -- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686) -- -- Host: 127.0.0.1 Database: neon -- ------------------------------------------------------ -- Server version 5.5.35-0ubuntu0.12.04.2 /*!4010...
-- @author prabhd -- @created 2014-04-01 12:00:00 -- @modified 2012-04-01 12:00:00 -- @tags dml MPP-21090 ORCA -- @product_version gpdb: [4.3-] -- @optimizer_mode on -- @description Tests for MPP-21090 \echo --start_ignore set gp_enable_column_oriented_table=on; \echo --end_ignore DROP TABLE IF EXISTS changedistpolic...
/* Navicat MySQL Data Transfer Source Server : Mysql Source Server Version : 50714 Source Host : localhost:3306 Source Database : book Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2017-11-23 07:06:15 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
create table active_transactions ( id INTEGER constraint active_transactions_pk primary key autoincrement, trade_zones_id int not null, servers_id int not null, clusters_id int not null, value DECIMAL not null, ...
<reponame>saturator22/betting-system-database --GET TRANSACTIONS FOR USER DROP FUNCTION getTransactions(id INT); CREATE OR REPLACE FUNCTION getTransactions(id INT) RETURNS table(d DATE, v INT, b BOOLEAN) AS $$ BEGIN EXECUTE 'CREATE OR REPLACE TEMP VIEW user_transactions_view AS SELECT t.date, t.va...
<filename>database/seeds/data/GeoRegionData.sql -- Adminer 4.2.5 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET NAMES utf8mb4; DROP TABLE IF EXISTS `geo_regions`; CREATE TABLE `geo_regions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT...
SELECT * FROM carro INNER JOIN montadora ON carro.idmontadora=montadora.idmontadora AND montadora.nome="Fiat";
DROP TABLE IF EXISTS `test_142`;
<gh_stars>0 ALTER TABLE terraria_world_file DROP CONSTRAINT terraria_world_file_world_fkey; ALTER TABLE terraria_world_file RENAME COLUMN world_id TO id; ALTER TABLE terraria_world ADD CONSTRAINT terraria_world_file_fkey FOREIGN KEY (id) REFERENCES terraria_world_file(id); --DELETE FROM flyway_schema_history WHERE...
# 10 SELECT e.`employee_id`, CONCAT(e.`first_name`, ' ', e.`last_name`) AS 'employee_name', CONCAT(mn.`first_name`, ' ', mn.`last_name`) AS 'manager_name', d.`name` AS 'department_name' FROM `employees` AS e INNER JOIN `employees` AS mn ON mn.`employee_id` = e.`manager_id` INNE...
-- Quick Device Component Report select -- from Device table DeviceStartTime, DeviceIPDotted, DeviceName, DeviceType, DeviceVendor, DeviceModel, -- DeviceVersion, -- DeviceSysLocation, -- DeviceDNSName, -- from DevicePhysical table DevicePhysicalID, -- DataSourceID, -- DeviceID, PhysicalIndex, PhysicalStartT...
CREATE TABLE IF NOT EXISTS cas_ticket ( id serial, type VARCHAR(5) NOT NULL, uid NAME NOT NULL , -- uid value VARCHAR(139) NOT NULL, -- Ticket value service VARCHAR(200) NOT NULL DEFAULT '', created timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ) WITH (OIDS=FALSE); CREATE INDEX IF NOT EXISTS...
ALTER TABLE "public"."artworks" ADD COLUMN "max_extensions" integer NULL;
<filename>src/test/resources/sql/select/0824accb.sql -- file:int8.sql ln:75 expect:true SELECT '' AS five, q2, float8(q2) FROM INT8_TBL
-- file:select_views.sql ln:81 expect:true GRANT SELECT ON my_credit_card_usage_secure TO public
<gh_stars>100-1000 CREATE VIEW happy.bananaView AS SELECT type, name, origin FROM bananas WHERE color = 'red'
SELECT COUNT(id) FROM bookmarks.bookmarks;
-- 2021-07-21T10:37:33.289Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,579515,0,'LastSepaExport',TO_TIMESTAMP('2021-07-21 13:37:33','YYYY-MM-DD...
--based on a code found on the Internet... USE MASTER; SET NOCOUNT ON -- *** WARNING: U-ndocumented commands used in this script !!! *** -- --Exit if a database named DummyTestDB exists IF DB_ID('DummyTestDB') IS NOT NULL BEGIN   RAISERROR('A database named DummyTestDB already exists, exiting script', 20, 1) WITH LO...
INSERT INTO PERSON (ID, GIVEN_NAME, SURNAME) VALUES (101, 'Peter', 'Pan'), (102, 'Wendy', 'Darling'), (103, 'John', 'Darling'), (104, 'Michael', 'Darling'), (105, 'Nana', null); INSERT INTO EMAIL_ADDRESS (PERSON_ID, ADDRESS) VALUES (101, '<EMAIL>'), (101, '<EMAIL>'), (102, '<E...
<gh_stars>0 INSERT INTO ECOLE_TEACHER VALUES (1, 'Michel', 'Dupont'); INSERT INTO ECOLE_TEACHER VALUES (2, 'Josiane', 'Delarue'); INSERT INTO ECOLE_TEACHER VALUES (3, 'Jean', 'Dupont'); INSERT INTO ECOLE_TEACHER VALUES (4, 'Jean', 'Buisson'); INSERT INTO ECOLE_PERIOD VALUES (1, to_date('20190103','YYYYMMDD'), to_date(...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Erstellungszeit: 10. Jun 2016 um 20:10 -- Server-Version: 5.5.47-0+deb8u1 -- PHP-Version: 5.6.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
select * from {{ var('snowplow:context:useragent') }}
<filename>dbt/redshift/models/base/parsely_parent_pageview_keys.sql {{ config( materialized='ephemeral' ) }} select apikey, session_id, visitor_site_id, pageview_post_id, pageview_post_id as url, referrer, ts_session_current, ts_action, event_id, LAG(ts_action, 1...
<gh_stars>10-100 -- +migrate Up DROP TABLE IF EXISTS `goose_db_version`; -- +migrate Down CREATE TABLE IF NOT EXISTS `goose_db_version`;
select l_orderkey from lineitem where l_returnflag not in ('N', 'S');
<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/function/func701.sql CREATE FUNCTION func701() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE64);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE447);val:=(SELEC...
<gh_stars>10-100 select id, name, location from azure.azure_postgresql_server where name = '{{ resourceName }}';
CREATE TABLE HT_DEPLOYMENT_UNIT (id BIGINT NOT NULL, CHECKSUM VARCHAR(255) NOT NULL, DEPLOYED_ON DATETIME, DEPLOY_DIR VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, PACKAGE_NAME VARCHAR(255) NOT NULL, STATUS VARCHAR(255) NOT NULL, TENANT_ID BIGINT NOT NULL, VERSION BIGINT NOT NULL, PRIMARY KEY (id)); CREATE TABLE H...
---date : ---alter table room ALTER table rooms DROP column capacity, DROP column facilities, DROP column price; ---create room type table create table Room_type_table( room_type TEXT, capacity integer, price integer ); create or replace FUNCTION get_room_collide_with_how_many_reservation(r_ID integer, check_i...
SELECT * FROM vlogs WHERE TimeIn>TimeOut
/* * Data Extraction from triax Database * */ /****************************************************************************************************** ****************************************************************************************************** * Question 1, <NAME> */ /* Query to get daily billable hou...
<reponame>khawsk/desafio_carefy<gh_stars>0 -- -------------------------------------------------------- -- Servidor: 192.168.127.12 -- Versão do servidor: 5.6.39-83.1 - Percona Server (GPL), Release 83.1, Revision da5a1c2923f -- OS do Servidor: Linux -- HeidiSQL Versão: ...
<reponame>anbya/contohUploadKeGit<filename>closedaydata/OLD/IAT2003200835.sql INSERT INTO pos_itemtemp VALUES("IATT200005841","193084","191001","192001","30000","1","30000","0","30000","1","1","1","IAT2003200835","NHO2018000007","PAID","","ORIGINAL"), ("IATT200005841","193079","191001","192001","30000","1","30000","0",...
<filename>backend/database.sql -- just writing some commands CREATE DATABASE perntodo; CREATE TABLE todo( todo_id BIGSERIAL NOT NULL PRIMARY KEY, description VARCHAR (300) );
<filename>code_structure/views_code/clients_per_city.sql DROP VIEW IF EXISTS clients_per_city GO CREATE VIEW clients_per_city AS SELECT A.city City, COUNT(*) Clients FROM Address A GROUP BY A.city GO
<filename>bancoaula15 JOINs.sql describe gafanhotos; alter table gafanhotos add column cursopreferido int; alter table gafanhotos add foreign key (cursopreferido) references cursos(idcurso); /*O curso preferido da tabela de gafanhotos está ligado com idcurso da tabela de cursos*/ update gafanhotos set cursopreferido ...
ALTER TABLE SALLE MODIFY CAPACITE NUMBER CHECK (CAPACITE >= 30); -- Ajoute un cinéma auquel la salle de test va appartenir INSERT INTO CINEMA (ID_CINEMA, NOM, ARRONDISSEMENT, ADRESSE) VALUES (1, '<NAME>', '2nd', '1 bd Poissonniere, Paris, FR '); -- Essaye d'insérer une nouvelle salle avec une capacité de 25 INSERT IN...