sql
stringlengths
6
1.05M
<filename>projection/bridge_activity/bridge_pending_activity/migrations/20211001034204_create_view_bridge_pending_activities.down.sql DROP TABLE IF EXISTS view_bridge_pending_activities;
-- database: presto_tpcds; groups: tpcds; requires: io.trino.tempto.fulfillment.table.hive.tpcds.ImmutableTpcdsTablesRequirements WITH ssr AS ( SELECT "s_store_id" , "sum"("sales_price") "sales" , "sum"("profit") "profit" , "sum"("return_amt") "returns" , "sum"("net_loss") "profit_loss" FROM ...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 27, 2019 at 05:28 PM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>apps/backend/prisma/migrations/20220119203424_certificate_capacity/migration.sql<gh_stars>0 -- CreateEnum CREATE TYPE "LabelEnumType" AS ENUM ('EKOENERGY', 'EUROPEAN_GREEN', 'GREEN_POWER_AUSTRALIA', 'GREEN_E_ENERGY', 'HKN_NEU100', 'MILIEUKEUR', 'NATUREMADE', 'OK_POWER', 'RECS_INTERNATIONAL_QUALITY_STANDARD', ...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 19, 2021 at 08:38 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>0 USE Geography GO SELECT CountryName, IsoCode FROM Countries WHERE CountryName LIKE '%a%a%a%' ORDER BY IsoCode SELECT PeakName, RiverName, LOWER(LEFT(PeakName, LEN(PeakName) - 1) + RiverName) AS Mix FROM Peaks, Rivers WHERE RIGHT(PeakName, 1) = LEFT(RiverN...
<reponame>baimtheelite/absensiforsed # Host: localhost (Version 5.5.5-10.1.13-MariaDB) # Date: 2019-01-27 19:06:59 # Generator: MySQL-Front 6.1 (Build 1.26) # # Structure for table "tbl_admin" # DROP TABLE IF EXISTS `tbl_admin`; CREATE TABLE `tbl_admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user` varchar(2...
DROP TABLE IF EXISTS #Employees GO -- Вывести значения полей [BusinessEntityID], [NationalIDNumber] -- и [JobTitle] из таблицы [HumanResources].[Employee] -- в виде xml, сохраненного в переменную. DECLARE @xmlVar XML; SET @xmlVar = ( SELECT [BusinessEntityID] AS 'BusinessEntityID' ,[NationalIDNumber] AS...
-- Author: <NAME> (vizoli) -- vizoli.hu -- github.com/zoltanviski -- hackerrank.com/zoltanviski -- Problem: https://www.hackerrank.com/challenges/revising-aggregations-the-count-function SELECT COUNT(*) FROM CITY WHERE POPULATION > 100000;
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 09, 2019 at 10:16 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2020 at 08:23 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- CreateTable CREATE TABLE "RoleGrant" ( "id" TEXT NOT NULL DEFAULT ulid_generate(), "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "roleKey" TEXT NOT NULL, "profileId" TEXT NOT NULL, "subjectTable" TEXT NOT NULL, "subjectId" TEXT NOT NULL, ...
-- https://www.hackerrank.com/challenges/name-of-employees/problem -- ORACLE SOLUTION SELECT NAME FROM EMPLOYEE ORDER BY NAME; -- MS SQL Server SOLUTION SELECT NAME FROM EMPLOYEE ORDER BY NAME;
<gh_stars>1-10 CREATE TABLE [dbo].[EVENT_TYPE] ( [et_id] INT NOT NULL PRIMARY KEY, [et_name] VARCHAR(100) NULL )
alter table "public"."transactions" drop constraint "transactions_bid_id_fkey", add constraint "transactions_bid_id_fkey" foreign key ("bid_id") references "public"."transactions" ("id") on update restrict on delete restrict;
-- wal2.test -- -- execsql { SELECT * FROM sqlite_master } SELECT * FROM sqlite_master
<reponame>18F/openFEC CREATE OR REPLACE FUNCTION public.get_office_cmte_tp (p_office varchar, p_cmte_tp varchar) RETURNS varchar AS $BODY$ begin return coalesce(p_office, (case when upper(p_cmte_tp) in ('S','H', 'P') then upper(p_cmte_tp) else null end)); end $BODY$ LANGUAGE plpgsql V...
with campaigns as ( select * from {{ ref('stg_mailchimp_campaigns')}} ), activities as ( select * from {{ ref('campaign_activities_by_campaign') }} ), joined as ( select campaigns.*, coalesce(activities.sends,0) as sends, coalesce(activities.opens,0) as opens, c...
CREATE TABLE [dbo].[Category] ( [Id] INT IDENTITY(1,1), [Name] NVARCHAR(MAX) NOT NULL, [DateCreated] DATETIME NULL, [DateUpdated] DATETIME NULL CONSTRAINT [Pk_Category] PRIMARY KEY ([Id]) )
<reponame>Halamix2/compass BEGIN; ALTER TABLE packages ADD COLUMN support_info TEXT; DROP VIEW IF EXISTS tenants_packages; ----- CREATE OR REPLACE VIEW tenants_packages (tenant_id, provider_tenant_id, id, ord_id, title, short_description, description, version, package_links, links, lice...
CREATE TABLE `tb_tmotlxzrja` ( `col_uesfklwmsk` date DEFAULT '2019-07-04', `col_zskjzqcxkk` varbinary(218) DEFAULT '\0', `col_rvztkthbca` time(6) NULL, `col_mpmkktdhop` mediumblob, UNIQUE `col_rvztkthbca` (`col_rvztkthbca`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tb_plneggfdkn` ( `co...
<filename>framework/resources/Functional/decimal/decimal8.sql select cast('999999999999999999' as decimal(18,0)) + cast('-0.0000000000000000000000000000000000001' as decimal(38,38)) from data limit 1;
ALTER TABLE IF EXISTS composes ADD CONSTRAINT org_id_constraint CHECK (org_id NOT SIMILAR TO '[ ]*');
create or replace package pa_orcas_extension_test is procedure run( p_model in ot_syex_model ); end; /
CREATE TYPE [dbo].[TVP_Context] AS TABLE ( [UserInfoID] [bigint] NULL, [UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ) GO
<gh_stars>1-10 -- ********************************************************************* -- Update Database Script -- ********************************************************************* -- Change Log: changelog.groovy -- Ran at: 3/13/12 4:11 PM -- Liquibase version: 2.0.1 -- ***********************************...
<gh_stars>1-10 CREATE TABLE `all_data_types_innodb` ( `tinyintcol` tinyint(4) DEFAULT NULL, `smallintcol` smallint(6) DEFAULT NULL, `mediumintcol` mediumint(9) DEFAULT NULL, `intcol` int(11) DEFAULT NULL, `bigintcol` bigint(20) DEFAULT NULL, `integercol` int(11) DEFAULT NULL, `serialcol` bigint(20)...
set client_min_messages to warning; create extension if not exists pgtap; reset client_min_messages; begin; select plan(4); create table test_table ( id integer primary key generated always as identity ); create table test_table_2 ( id integer primary key generated always as identity ); create role test_role; ...
<filename>SQL/Caseins.sql --beta caseins SELECT DISTINCT gen.GEN_ZIV_ID_SEQ , gen.GEN_BCNAB, gen.GEN_BCN_A2, gen.GEN_BETA_GENOTIP, ziv.SIF_SPOL FROM GOVEDO.GEN_RJAVA gen, zivali ziv WHERE ziv.ZIV_ID_SEQ=gen.GEN_ZIV_ID_SEQ;...
<reponame>tahsinalamin/colexpgraph /*Table - E(i,j,v) where i,j are vertices and v is the weight*/ /* Finding Indegree of the vertices*/ SELECT j AS nodes, COUNT(j) AS indegree FROM E GROUP BY j; /* Finding Outdegree of the vertices*/ SELECT i AS nodes, COUNT(i) AS outdegree FROM E GROUP BY i;
-- Protect against this script being sourced by psql. \echo Use "CREATE EXTENSION" to load this file. \quit -- Info for relation_create event. CREATE TYPE relation_create_eventinfo AS ( relation REGCLASS, new PG_CATALOG.PG_CLASS ); CREATE FUNCTION get_relation_create_eventinfo() RETURNS relation_create_e...
<filename>elpa-26.2/sql-indent-1.3/test-data/pr42.sql -- sql-indent used to think that the statement begins at the "FOR" keyword in -- "V_SPORT_ZONE_FOR_SESSION" create view V_SPORT_ZONE_FOR_SESSION as select S.id as session_id, VSZ.zone_id as zone_id, VSZ.zone_metric_id as zone_metric_id from A...
<filename>database/woodenbox_contents.sql -- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 16, 2015 at 11:00 AM -- Server version: 5.5.39 -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
<gh_stars>0 CREATE SCHEMA IF NOT EXISTS user_schema; CREATE TABLE IF NOT EXISTS user_schema.user( id SERIAL PRIMARY KEY, first_name VARCHAR(250) NOT NULL, last_name VARCHAR(250) NOT NULL, email VARCHAR(250) NOT NULL UNIQUE, password VARCHAR(250) NOT NULL, token VARCHAR(255) NOT NULL, age INT CONSTRAINT al...
SELECT '--- 07 Self Documentation ---' AS title ; -- You may have noticed up to now that I have been using triple hiphon comments -- within function bodies. This is so that we can provide the client with what -- I refer to as self-documentation. You may recognis this technique from -- languages such as python which ha...
<filename>undergrad/dbscratch/learn-db/hw/hw38_01.sql SELECT real_name FROM name_list WHERE real_name LIKE '%ilip%' ;
create table "user" ( "id" serial not null primary key, "name" varchar(64) not null, "email" varchar(320) not null, "password" varchar(64) not null, "enabled" boolean not null default 'f' ); create table "instance" ( "id" serial not null primary key, "user_id" integer not null references "user"("...
DROP PROCEDURE IF EXISTS clean_DB; DELIMITER $$ # CALL clean_DB(); CREATE DEFINER=`root`@`localhost` PROCEDURE `clean_DB`() BEGIN DECLARE cnt INT(11); DECLARE insert_id INT(11); TRUNCATE TABLE users; TRUNCATE TABLE position; TRUNCATE TABLE codes; TRUNCATE TABLE commission; TRUNCATE TABLE withdrawal; ...
SELECT * FROM SYSTEM_ATTRIBUTES WHERE SYSTEM_NAME = ? ; ;
<filename>mysql/createdatabases.sql<gh_stars>0 /* borrowing.sql Create a database 'borrowdb' Create a table 'borrowed' in the 'borrowdb' database to hold the list of library borrowing transactions Grant a user 'rest', and grant SELECT, INSERT, UPDATE and DELETE privileges on the 'borrowed' table Th...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 14, 2019 at 12:19 AM -- Server version: 10.3.20-MariaDB-1:10.3.20+maria~bionic-log -- PHP Version: 7.2.24-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*...
-- "Initial implementation for: 3 Provisioning Fiber 1 Productive Forest 311" -- AR5 has whole norway coverage so we may safely assume -100 for areas that don't match the criteria. -- Definitions via Knut. Can be replaced or added to by Wenche's definition. -- "artype" = 30 AND "arskogbon" IN (12,13,14,15) : 1...
select C.name from customers C join legal_person LP on LP.id_customers = C.id
DROP DATABASE IF EXISTS company_db; CREATE DATABASE company_db; USE company_db; DROP TABLE IF EXISTS department; DROP TABLE IF EXISTS roles; DROP TABLE IF EXISTS employee; CREATE TABLE department ( id INTEGER NOT NULL AUTO_INCREMENT, department_name VARCHAR(60) NOT NULL, PRIMARY KEY(id) ); CREATE TABL...
<reponame>JoaoCostaIFG/SDLE<gh_stars>0 DROP TABLE IF EXISTS User; CREATE TABLE User ( user_id INTEGER PRIMARY KEY ASC, user_username TEXT UNIQUE NOT NULL, user_pubkey TEXT NOT NULL ); DROP TABLE IF EXISTS Post; CREATE TABLE Post ( post_id INTEGER PRIMARY KEY ASC, post_date INTEGER NOT NULL DEFAULT ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 22, 2021 at 02:02 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
use gmall; with tmp_start as ( select mid_id, brand, model, count(*) login_count from dwd_start_log where dt = '2020-06-14' group by mid_id, brand, model ), tmp_page as ( select mid_id, brand, model, collect_...
<reponame>avabot/abot CREATE TABLE remotetokens ( token VARCHAR(255) UNIQUE NOT NULL, email VARCHAR(255) NOT NULL, pluginid INTEGER NOT NULL, createdat TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, PRIMARY KEY (token) );
-- MySQL dump 10.13 Distrib 5.6.35, for debian-linux-gnu (i686) -- -- Host: localhost Database: dw_cms_dwsite -- ------------------------------------------------------ -- Server version 5.6.35-1+deb.sury.org~trusty+0.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SE...
<filename>models.sql<gh_stars>1-10 CREATE TABLE IF NOT EXISTS diets ( id TEXT PRIMARY KEY, date TIMESTAMPTZ NOT NULL, timestamp TEXT NOT NULL, type INTEGER NOT NULL, content TEXT, canceled BOOL DEFAULT false NOT NULL, created_at TIMESTAMPTZ DEFAULT curren...
<filename>src/test/resources/sql/select/28adc2cd.sql -- file:tstypes.sql ln:119 expect:true SELECT to_tsvector('simple', '1 2 3 4') @@ '1 <-> 2 <-> 3' AS "true"
<reponame>beaglecode/skytools create or replace function pgq_ext.get_last_tick(a_consumer text, a_subconsumer text) returns int8 as $$ -- ---------------------------------------------------------------------- -- Function: pgq_ext.get_last_tick(2) -- -- Gets last completed tick for this consumer -- -- Parameters: -- ...
DELETE FROM script_texts WHERE entry IN (-1000323, -1000324); INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1000323, 'Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health.',0,0,7,0,'mist SAY_AT_HOME'), (-1000...
create table Countries ( name char(50), country_id char(50) unique, area_sqkm integer, population integer ); insert into Countries (name, country_id, area_sqkm, population) values ('Dominican Republic', 'DO', 15819664, 3634588497); insert into Countries (name, country_id, area_sqkm, population) values ('Indonesia',...
-- SQL support for fake lobs for ACS/Postgres. -- <NAME> February 2000 -- for each user table my_table in which you want to stuff large -- amounts of data: -- define a column "lob integer references lobs" -- do "create trigger my_table_lob_trig before delete or update or insert -- on my_table for each row execute pro...
CREATE OR REPLACE FUNCTION move(_address1 TEXT, _address2 TEXT, _amount BIGINT, _step BIGINT) RETURNS BOOLEAN LANGUAGE plpgsql AS $func$ BEGIN UPDATE accounts SET amount = amount - _amount WHERE address = _address1 AND amount >= _amount; IF NOT FOUND THEN RAISE EXCEPTION 'Not enough money in %', _addr...
-- MySQL dump 10.16 Distrib 10.2.19-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: ys60_cs3101 -- ------------------------------------------------------ -- Server version 10.2.19-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jan 03, 2019 at 05:40 AM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
-- Revert ggircs-portal:types/linked_product_return from pg begin; drop type ggircs_portal.linked_product_return; commit;
/* The characters 'ı' and 'ſ' have lengths 2 */; /* but their upper case 'I' and 'S" have length 1 */; /* Code that relies on indices extracted from ToUpper will fail on this table*/; CREATE TABLE `ı` ( `ſ` varchar(5) NOT NULL ) ENGINE=InnoDB;
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50547 Source Host : localhost:3306 Source Database : thinkyou Target Server Type : MYSQL Target Server Version : 50547 File Encoding : 65001 Date: 2016-11-25 18:01:19 */ SET FOREIGN_KEY_CHECKS=0; -- ...
/* dedup_title_relationships.sql is a MySQL script intended to remove duplicates from the title relationships table. Version: $Revision$ Date: $Date$ (C) COPYRIGHT 2013 <NAME> ALL RIGHTS RESERVED The copyright notice above does not evidence any actual or intended publication...
<filename>public/arquivos/sql.sql CREATE SCHEMA IF NOT EXISTS `quake` DEFAULT CHARACTER SET utf8 ; USE `quake` ; -- ----------------------------------------------------- -- Table `quake`.`games` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `quake`.`games` ( `idgame` INT NOT NU...
<reponame>Zhaojia2019/cubrid-testcases --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t1 (FirstName varchar(20),LastName varchar(20),Age int,gender char (1)); insert into t1 value('yin', 'jian ye',31,'M'); --TEST Create successfully CREATE INDEX first_name_lower ON t1 (LOWER(FirstName))...
<filename>database/sql.sql UPDATE Avencas set Avencas.DataFim = '2020-12-30 00:00:00.000' WHERE ((Avencas.Avenca = 'M3723')); UPDATE Avencas set Avencas.DataFim = '2020-12-30 00:00:00.000' WHERE ((Avencas.Avenca = 'M3877')); UPDATE Avencas set Avencas.DataFim = '2020-12-30 00:00:00.000' WHERE ((Avencas.Avenca = 'M4646'...
<reponame>paulyc/PROJ --- This file has been generated by scripts/build_db.py. DO NOT EDIT ! INSERT INTO "compound_crs" VALUES('EPSG','3901','KKJ / Finland Uniform Coordinate System + N60 height',NULL,'EPSG','2393','EPSG','5717',0); INSERT INTO "usage" VALUES('EPSG','2881','compound_crs','EPSG','3901','EPSG','3333','E...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 26, 2021 at 04:44 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<reponame>naily26/PWL_10 -- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 18, 2021 at 05:21 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
DROP TABLE IF EXISTS aline_pivoted_lab CASCADE; CREATE TABLE aline_pivoted_lab as -- remove duplicate labs if they exist at the same time with vw0 as ( select patientunitstayid , labname , labresultoffset , labresultrevisedoffset from eicu_crd.lab where labname in ( 'albumin' , 'tota...
CREATE PROCEDURE [dbo].[spProduct_GetAll] AS begin set nocount on; select Id, ProductName, [Description], RetailPrice, QuantityInStock, IsTaxable from dbo.Product order by ProductName; end;
<reponame>parapanda/node-mysql3<filename>test/create-500k-random-ints-doubles-table.sql -- from http://sixarm.com/about/mysql-create-random-data-text-strings.html drop table if exists ints; drop procedure if exists randomize_nums; CREATE TABLE ints ( id int(11) NOT NULL AUTO_INCREMENT, val1 int(11), val2 ...
<reponame>GionRubitschung/event-haendler DROP TABLE IF EXISTS user; CREATE TABLE user ( id INT NOT NULL AUTO_INCREMENT, username VARCHAR(64) NOT NULL, password VARCHAR(255) NOT NULL, name VARCHAR(64) NOT NULL, firstname VARCHAR(64) NOT NULL, email VARCHAR(128) NOT NULL UNI...
DECLARE @mPIC varchar(1000); DECLARE @mProject varchar(2000); DECLARE @mShipment varchar(2000); DECLARE @mFileName varchar(2000); DECLARE @mStatus varchar(2000); DECLARE @mWhere varchar(2000); SET @mPIC='ZDQ'; SET @mProject='APPEB'; --APPEB SET @mShipment=''; --GMMEB05152018 SET @mFileName=''; --GMM0518EB28_4 SET @m...
-- -- Customers Data to be inserted into table customer -- insert into customer(customer_password,customer_phone_no,customer_first_name,customer_last_name, customer_address,customer_postcode) values(1234,95200813,"Peter","Conforto","12 Cassandra Crescent Heathcote", 2233); insert into customer(customer_password,cus...
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 04, 2017 at 07:34 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
<reponame>CHENPrime-coder/competition-training-PLANB /* SQLyog Professional v12.09 (64 bit) MySQL - 8.0.26 : Database - competitiontraining ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNI...
-- file:xml.sql ln:166 expect:true CREATE VIEW xmlview7 AS SELECT xmlroot(xml '<foo/>', version no value, standalone yes)
<reponame>surajpotnuru/sqllineage insert overwrite table query55 select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where d_date_sk = ss_sold_date_sk and ss_item_sk = i_item_sk and i_manager_id = 28 and...
# Write your MySQL query statement below select distinct s1.* from stadium as s1, stadium as s2, stadium as s3 where ((s1.id + 1 = s2.id and s1.id + 2 = s3.id) or (s1.id - 1 = s2.id and s1.id + 1 = s3.id) or (s1.id - 2 = s2.id and s1.id - 1 = s3.id)) and s1.people >= 100 and s2.people >= 100 and s3.peop...
select count(id) as 'total_employees', role_id where role_id in(select id from roles where dept_id = 4) from employees group by role_id; (didnt work) select count(id) as 'total_employees', role_id from employees group by role_id; (worked) select first_name from employees where role_id in(select id from roles where d...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 29-04-2016 a las 23:57:27 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
create table bookmark( uuid binary not null, url VARCHAR(255), version int not null default 1, PRIMARY KEY (uuid) )
NOTA : En este ejemplo se muestra como en la Select se seleciona un registro usando la clausula WHERE MERGE INTO TDE_FAMILIA ANTES USING (SELECT '1' FAM_IDFAMILIA, 'Ocio' FAM_NOMCAS FROM TDE_FAMILIA WHERE FAM_IDFAMILIA=1) DESPUES ON (ANT...
<reponame>RPmorning/article -- ----------------------------- -- Table structure for `krcmf_member` -- ----------------------------- DROP TABLE IF EXISTS `krcmf_member`; CREATE TABLE `krcmf_member` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID', `username` char(16) NOT NULL COMMENT '用户名', `password...
<gh_stars>0 create table "user" ( id SERIAL PRIMARY KEY, username VARCHAR NOT NULL, remarks TEXT NOT NULL );
CREATE UNIQUE INDEX "PKEY_ELECTRONIC_ADDRESS" ON "ELECTRONIC_ADDRESS" ("AGENT_ID", "ADDRESS_TYPE", "ADDRESS")
select fn_db_add_column('vm_static', 'is_disabled', 'boolean default false');
<reponame>AlexeyLevin/blog<gh_stars>10-100 CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) ); INSERT INTO Persons VALUES (1, 'Johannes', 'Innerbichler', 'Salzburg');
ALTER TABLE manufacturer ALTER COLUMN code TYPE character varying(4); ALTER TABLE manufacturer ALTER COLUMN name TYPE character varying(50); ALTER TABLE manufacturer ALTER COLUMN name SET NOT NULL; ALTER TABLE device_model ALTER COLUMN code TYPE character varying(4);
<filename>dac/backend/src/main/resources/queries/tpch/14.sql -- -- Copyright (C) 2017-2019 Dremio Corporation -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.a...
alter table ao_table_for_alter set tablespace twophase_test_ts2;
<reponame>wych42/sqlboiler -- Don't forget to maintain order here, foreign keys! drop table if exists video_tags; drop table if exists tags; drop table if exists videos; drop table if exists sponsors; drop table if exists users; drop table if exists type_monsters; create table users ( id int primary key not null auto...
Drop table users; CREATE TABLE USERS( ID NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY, Nom VARCHAR(20) NOT NULL, Prenom VARCHAR(20) NOT NULL, DateEnregistrement TIMESTAMP DEFAULT sysdate NOT NULL, DateDernierLogin TIMESTAMP NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE MARQUE( ID NUMBER GENERATED BY DEFAULT ON...
<filename>tests/data/sqlfiles/simple.sql UPDATE cfg SET cfg_value = '1' WHERE cfg_id = 8; -- a comment DELETE FROM foo WHERE bar = 8; INSERT INTO test (x, y) VALUES ( (1, 4), (7, 8) );
-- phpMyAdmin SQL Dump -- version 4.6.6deb5ubuntu0.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 23, 2021 at 03:54 PM -- Server version: 5.7.36-0ubuntu0.18.04.1 -- PHP Version: 7.2.24-0ubuntu0.18.04.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SE...
SELECT "TableroSistemaPenal_8"."Calculation_6750825005603169" AS "Calculation_6750825005603169" FROM "TableroSistemaPenal_8" GROUP BY 1 ORDER BY "Calculation_6750825005603169" ASC ;;
DROP TABLE IF EXISTS `sprint`;
--- checking the desequilibrate batch --- select * FROM xafnfc.actb_daily_log lo where lo.batch_no = '1026' SELECT * FROM getm_liab WHERE id = '91822'; --- --- checking the validated desequiliFbrate batch --- --- select*from xafnfc.fbtb_txnlog_master ff where ff.txnactdet='0231720101560102' and ff.txnamtdet='87...
-- a script that prints the full description of the table first_table\ -- from the database hbtn_0c_0 in your MySQL server. -- The database name will be passed as an argument of the mysql command -- You are not allowed to use the DESCRIBE or EXPLAIN statements SHOW CREATE TABLE first_table;
<gh_stars>1-10 CREATE TABLE dev_nets ( id INTEGER PRIMARY KEY, insert_date DATE, device_name VARCHAR(128), iface_name VARCHAR(32), iface_addrs VARCHAR(1024), iface_subnets VARCHAR(1024), iface_inacl VARCHAR(32), iface_outacl VARCHAR(32), iface_descr VARCHAR(1024) ) UPDATE dev_nets SET insert_date = DATETIME WHERE rowid...