sql
stringlengths
6
1.05M
SELECT subq_0.c5 AS c0, CASE WHEN (((1) AND (EXISTS ( SELECT ref_11.o_orderpriority AS c0, subq_0.c4 AS c1, ref_11.o_shippriority AS c2 FROM main.orders AS ref_11 ...
CREATE Function getNextRunTimeFromCron(@lastRunTime datetime, @cronString varchar(100)) returns datetime as Begin --Declare @lastRunTime datetime = '2017-03-16 17:20:58.520', @cronString varchar(100) = '10-/5 * * * * *' Declare @CoreTable Table(Idx int, data int) Declare @ValidDays Table(dt date Primary key, isVal...
<reponame>rockmind/LoveAndMarriage CREATE TABLE country ( id_cntry SMALLSERIAL CONSTRAINT cntry_first_key PRIMARY KEY, cntry_name varchar(40) NOT NULL ); INSERT INTO country (id_cntry, cntry_name) VALUES ('0', 'All'); INSERT INTO country (cntry_name) VALUES ('Afganistan'), ('Albania'), ('Algieria'), ('An...
// Create Keyspace DROP KEYSPACE test; CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class':'NetworkTopologyStrategy', 'Analytics': 1}; // Create table for text data CREATE TABLE IF NOT EXISTS test.xml_data ( doc_id text, interval timestamp, created timestamp, status text, data text, PRIMA...
/* * Copyright (c) 2010-2012 LabKey Corporation * * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 */ SELECT h.id, h.date, max(h.CD3) as CD3, max(h.CD20) as CD20, max(h.CD4) as CD4, max(h.CD8) as CD8 FROM ( SELECT h.id, h.date, h.runId, CASE WHE...
IF OBJECT_ID('finance.income_selector_view') IS NOT NULL DROP VIEW finance.income_selector_view; GO CREATE VIEW finance.income_selector_view AS SELECT finance.account_scrud_view.account_id AS income_id, finance.account_scrud_view.account_name AS income_name FROM finance.account_scrud_view WHERE a...
<filename>county_typology/output/CountyTypology.ddl.sql<gh_stars>1-10 CREATE TABLE county_typology ( fipsid varchar(5), state char(2), name text, is_metro boolean, econ_type smallint, econ_type_txt text, is_farming boolean, is_mining boolean, is_manufacturing boolean, is_govt boolean, is_recreati...
SET NOCOUNT ON; DECLARE @century int = 2000; DECLARE @channelName nvarchar(512) = 'com1://localhost'; DECLARE @portName nvarchar(max) = 'COM1'; DECLARE @baudRate int = 19200; DECLARE @dataBits tinyint = 8; DECLARE @parity tinyint = 0; DECLARE @stopBits tinyint = 1; DECLARE @readTimeout int = 250; DECLARE @writeTimeout...
<gh_stars>10-100 -------------------------------------------------------- -- DDL for Sequence DATABASE_CONNECTIONS_SQ -------------------------------------------------------- CREATE SEQUENCE "DATABASE_CONNECTIONS_SQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER NOC...
-- REQUIRES THREE ARGUMENTS: -- $1, $2, $2 all must be empty string, or comma-delimited string, or array of string: select * from ( select schemaname as schema, viewname as name from pg_views where schemaname <> 'pg_catalog' and schemaname <> 'information_schema' union select schemaname as schema, matviewname...
<reponame>CUBRID/cubrid-testcase autocommit off; select product.product_code, product.descr, product.price, quantity, location from joe.inventory_c i; delete from joe.inventory_c where product.product_code > 5; select product.product_code, product.descr, product.price, quantity, location from joe.inv...
CREATE TABLE `trn_crmevent` ( `crmevent_id` varchar(14) NOT NULL , `crmevent_name` varchar(30) NOT NULL , `crmevent_descr` varchar(90) , `crmevent_dtstart` date NOT NULL , `crmevent_dtend` date NOT NULL , `crmevent_dtaffected` date NOT NULL , `crmevent_message` varchar(255) , `crmevent_iscommit...
<reponame>NATO-NICS/nics-db<gh_stars>0 -- Change file for incident_org feature -- Join table for which orgs have been secured to an incident CREATE TABLE incident_org ( orgid integer not null, incidentid integer not null, userid integer not null, created timestamp without time zone DEFAULT now() NOT N...
<filename>src/main/resources/db/migration/V1_4_6__update_t_ship_sortno.sql<gh_stars>1-10 ALTER TABLE `kancolle`.`t_ship` CHANGE `SORTNO` `SORTNO` SMALLINT(4) UNSIGNED DEFAULT 0 NOT NULL COMMENT '图鉴ID';
delete from tasks;
CREATE TABLE IF NOT EXISTS SUBSCRIBER ( ID INT PRIMARY KEY AUTO_INCREMENT NOT NULL, NAME VARCHAR(255) NOT NULL, AGE INT NOT NULL );
CREATE TABLE users ( id int PRIMARY KEY, username text UNIQUE NOT NULL, display_name text, image_url text NOT NULL, "createdAt" date NOT NULL, "updatedAt" date NOT NULL, bio text ); CREATE TABLE posts ( id serial PRIMARY KEY, message text NOT NULL, "createdAt" date NOT NULL, ...
CREATE DATABASE testChallenge; GRANT ALL PRIVILEGES ON mydb.* TO 'root'@'%' IDENTIFIED BY 'root'; GRANT ALL PRIVILEGES ON mydb.* TO 'root'@'localhost' IDENTIFIED BY 'root';
INSERT INTO Employees(LastName,FirstName,BirthDate,Photo,Notes) VALUES ('Davolio','Nancy','1968-12-08','EmpID1.pic','Education includes a BA in psychology from Colorado State University. She also completed (The Art of the Cold Call). Nancy is a member of ''Toastmasters International''.'); INSERT INTO Employees(LastName...
<reponame>Timpp4/Database-Systems-Management -- TASK 02: -- Let's start with creating sequences and tables first create sequence custid_seq start with 10000 increment by 1 cache 20 nominvalue nomaxvalue nocycle noorder; / create sequence accnumber_seq start with 20000 increment by 1 cache 20 nominval...
<gh_stars>1-10 /* Summary: Get all the groups that the specified user is in. */ CREATE PROCEDURE GetGroupsOfUser ( @UserID INT ) AS SELECT G.* FROM UserGroup AS UG INNER JOIN [Group] AS G ON UG.GroupID = G.GroupID WHERE UG.UserID = @UserID ORDER BY G.Title ASC
-- ============================================= -- Author: <NAME> -- Create date: 10/07/2012 -- Description: Returns simple upgrade data -- ============================================= CREATE PROCEDURE [dbo].[h3giGetSimpleUpgradeData] @BAN VARCHAR(10), @mobileNumberArea VARCHAR(3), @mobileNumberMain VAR...
<filename>DatabaseFiles/Views/v_deviceConfigurations.sql USE [Intune]; GO SET NOCOUNT ON; /*************************************************************************************************************************** Object: dbo.v_deviceConfigurations History: Date Version Author Notes: 04...
--DROP TRIGGER insert_property; CREATE TRIGGER IF NOT EXISTS insert_property INSTEAD OF INSERT ON molecule_method_property_denorm FOR EACH ROW BEGIN INSERT OR IGNORE INTO property (name, description, format) VALUES (NEW.name, NEW.description, NEW.format); INSERT OR REPLACE INTO molecule_method...
########################################################### ### ### ### Panda3D Configuration File ### ### ### ########################################################### #fullscreen #t asse...
<reponame>paullgdc/yuribot_rs<filename>migrations/2020-07-31-164836_fix_fts_corruption/up.sql<gh_stars>1-10 -- Drop previous full text index and rebuild it -- DROP TABLE links_title_idx; DROP TRIGGER links_fts_ai; DROP TRIGGER links_fts_ad; DROP TRIGGER links_fts_au; CREATE VIRTUAL TABLE links_title_idx USING fts5(id ...
<reponame>kishanrajput23/Progate-SQL-Course<filename>sql_study_1/page2/exercise2.sql -- get the "price" column from the "purchases" table SELECT price from purchases;
<reponame>GrKolychev/NGB<filename>server/catgenome/src/main/resources/database/catgenome/h2/v2018.09.17_11.03__ACL_tables.sql CREATE TABLE catgenome.user ( id BIGINT NOT NULL primary key, name VARCHAR(1024) NOT NULL, attributes VARCHAR(1000000), CONSTRAINT unique_key_user_name UNIQUE (name) ); CREATE T...
CREATE TABLE [dbo].[Fact_WindTurbineMetrics] ( [DeviceId] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [MeasureTime] datetime NULL, [GeneratedPower] float NULL, [WindSpeed] float NULL, [TurbineSpeed] float NULL ) WITH (CLUSTERED COLUMNSTORE INDEX, DISTRIBUTION = ROUND_ROBIN);
-- http://www.sqlserver-dba.com/2011/09/this-is-a-followup-on-my-earlier-post-of-sql-server-test-data-generation-testing-tools-i-had-some-requests-for-my-set-up-pr.html SELECT TOP 20 C_CUSTKEY, C_NAME, SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS REVENUE, C_ACCTBAL, N_NAME, C_ADDRESS, C_PHONE, C_COMMENT FROM CUSTOMER, ORDERS...
<filename>Smart.Data.Accessor.Benchmark/Sql/IBenchmarkAccessor.Execute.sql INSERT INTO Data (Id, Name) VALUES (/*@ entity.Id */1, /*@ entity.Name */'xxx')
/* * File: 14_participant_chart.sql * File Created: Tuesday, 12th May 2020 2:24:50 pm * Author: <NAME> * Last Modified: Tuesday, 12th May 2020 2:29:02 pm * Modified By: <NAME> * ----- * (c) 2020, WHO/AFRO/UCN/ESPEN */ /* * This query will return the participant per sex * Variable to rename <%v_ab_cde_fgh_2_...
<gh_stars>0 -- -- demo.sql -- -- Inserts some word and disjunct data into the database. -- This is for demonstration purposed only: it inserts just enough to -- parse the sentences "this is a test" "this is a dog" "this is -- a cat", "that is a test", "that is another dog", etc. The disjuncts -- are a small subset of ...
select * from `filter/pushdown/DRILL_6259_test_data` t where t.list_of_complex_fields[0].nested_complex_field.nested_field is not null;
Hola Mundo 2 responsable: <NAME>
<filename>sql/select_hook.sql select hooks.hook, hooks.events, hooks.url, hooks.active, hooks.created, hooks.updated from hooks join apps on apps.app = hooks.app where hooks.hook::varchar(128) = $1::varchar(256) and hooks.deleted = false
<gh_stars>1-10 BEGIN; INSERT INTO ref_pubmed ( ref_pubmed_id, authors, location, title, doi ) ( SELECT DISTINCT ref_pubmed_id, authors, location, title, doi FROM load_ref_pubmed ) ON CONFLICT (ref_pubmed_id) DO UPDATE SET authors = EXCLUDED.authors, location = EXCLUDED.l...
/* * Copyright (c) 2018 LabKey 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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
SELECT 'Const Offset'; select 1 as offset, toFixedString('Hello', 6) as s, subString(bin(s), offset), bin(bitSlice(s, offset)); select 2 as offset, toFixedString('Hello', 6) as s, subString(bin(s), offset), bin(bitSlice(s, offset)); select 3 as offset, toFixedString('Hello', 6) as s, subString(bin(s), offset), bin(b...
<reponame>somethingweird/ExpressionEngine<filename>tests/rspec/sql/database_2.10.1.sql<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.6.25-73.1, for osx10.10 (x86_64) -- -- Host: localhost Database: ee.stability -- ------------------------------------------------------ -- Server version 5.6.25-73.1 /*!40101 SET @OLD_...
-- MySQL dump 10.13 Distrib 5.7.18, for osx10.13 (x86_64) -- -- Host: localhost Database: os_moderator -- ------------------------------------------------------ -- Server version 5.7.18 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
BEGIN; alter table user__usergroup rename column usergroups_id to groups_id; COMMIT;
<reponame>suryatmodulus/tidb /*!40101 SET NAMES binary*/; /*!40014 SET FOREIGN_KEY_CHECKS=0*/; /*!40103 SET TIME_ZONE='+00:00' */; INSERT INTO `non_pk_auto_inc` VALUES ("c5862b7d-e2a1-11e8-81d3-d5360eceeab8",1), ("d7c9dce1-e2a1-11e8-beea-a3f4b99b3e1e",3), ("d7c9de1f-e2a1-11e8-8630-b1256aff79d4",4), ("d7c9de81-e2a1-11e8...
INSERT INTO typeSushi (sushi_name,devoured)VALUES("Shrimp Tempura",true); INSERT INTO typeSushi (sushi_name)VALUES("California Roll"); INSERT INTO typeSushi (sushi_name)VALUES("Philadelphia Roll"); INSERT INTO typeSushi (sushi_name,devoured)VALUES("Spicy Salmon Roll",true); INSERT INTO typeSushi (sushi_name)VALUES(...
/* **************************************************************************** ** _view_validate_p() ** ** Generates ddls for user views(s) (as sequetial varchar rows) including owner ** and GRANTs for a given database. ** ** Usage: ** See COMMENT ON FUNCTION statement after CREATE PROCEDURE. ** ** (c) 2018 Yellow...
INSERT INTO TB_PROFILES (ID, DATA_CRIACAO, NOME, DATA_DE_ATUALIZACAO ) VALUES (1, CURRENT_TIMESTAMP(), 'Admin', CURRENT_TIMESTAMP()); INSERT INTO TB_USUÁRIOS (ID, ATIVO, DATA_CRIACAO, EMAIL, NOME, SENHA, DATA_DE_ATUALIZACAO, PROFILE_ID) VALUES (1, TRUE, CURRENT_TIMESTAMP(), '<EMAIL>', '<NAME>', '$2a$10$htvQ1StZEN2vFN3d...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1:3306 -- Thời gian đã tạo: Th6 04, 2021 lúc 03:45 PM -- Phiên bản máy phục vụ: 10.4.11-MariaDB -- Phiên bản PHP: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>zengbin0913/white_whale SET NAMES UTF8; DROP DATABASE IF EXISTS whale; CREATE DATABASE whale CHARSET=UTF8; USE whale; /*1.4.1用户信息表(个人)*/ CREATE TABLE whale_user( uid INT PRIMARY KEY AUTO_INCREMENT, uname VARCHAR(16), upwd VARCHAR(32), #6-12位数字大小写字母组合,必须包含一个大写字母和数字 phone VARCHAR(11), email VARCHAR(...
<filename>multiplecrudajax.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Waktu pembuatan: 18 Des 2020 pada 04.07 -- Versi server: 10.4.13-MariaDB -- Versi PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; ...
---First, we need to take all of the OSI-approved licenses from the gh.licenses table and make a new table with only the osi_licenses. ---Bayoan has also add a new process of automating this table to find out when new licenses are approved (see GHOSS.jl) CREATE MATERIALIZED VIEW gh.desc_osi_licenses AS ( SELECT name, ...
/* User Table ----------------------------------- @tablename _auth_user @version 1.5.0-beta.1 */ CREATE TABLE `_auth_user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(100) NOT NULL DEFAULT '', `name` varchar(32) NOT NULL DEFAULT '', `fullname` varchar(100) NOT NULL ...
<filename>src/test/resources/rollback.test_6.sql -- rollback.test -- -- execsql { -- SELECT distinct tbl_name FROM sqlite_master; -- } SELECT distinct tbl_name FROM sqlite_master;
<filename>src/test/resources/sql/insert/79f1a3fe.sql -- file:plpgsql.sql ln:1182 expect:true insert into WSlot values ('WS.003.3a', '003', '', '')
<reponame>MaikMichel/dbFlux<filename>dist/create_workspace_user.tmpl.sql set define '^' set verify off ------------------------------------------------------------------------------------- PROMPT ============================================================================= PROMPT == CREATE APEX User {{user_name}}...
<filename>src/db/sqlite/sql/topic-content-fetch-needed.sql -- claim some topics needing their contents fetched SELECT id FROM topic_fetch_needed LIMIT :wanted
<reponame>MesAdima/southern_cross CREATE TABLE `applicant_religion_info` ( `entry_id` int(11) NOT NULL AUTO_INCREMENT, `applicant_id` int(11) NOT NULL, `denomination` varchar(250) NOT NULL, `date_of_entry` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`entry_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin...
CREATE TABLE IF NOT EXISTS `sApp` ( `id` VARCHAR(32) COLLATE utf8_bin NOT NULL COMMENT 'MD5(publisher+name) ', `publisher` VARCHAR(255) COLLATE utf8_bin NOT NULL COMMENT 'publisher', `name` VARCHAR(255) COLLATE utf8_bin NOT NULL COMMENT 'app name', `catalog` ...
<gh_stars>0 USE bdEscola SELECT nomeAluno AS 'Nome Aluno', rgAluno AS 'RG', dataNascimentoAluno AS 'Data de Nascimento' FROM tbAluno​ WHERE naturalidadeAluno LIKE '%SP%' SELECT nomeAluno AS 'Nome Aluno', rgAluno AS 'RG' FROM tbAluno​ WHERE nomeAluno LIKE 'P%' SELECT nomeCurso AS 'Cursos' FROM tbCurso WHERE...
<filename>lib/jdomodels/src/main/resources/sql/TempActionRequired-ddl.sql CREATE TEMPORARY TABLE %S ( `FILE_ID` BIGINT NOT NULL, `ACTION_TYPE` ENUM('ACCESS_REQUIREMENT', 'DOWNLOAD_PERMISSION') NOT NULL, `ACTION_ID` BIGINT NOT NULL, PRIMARY KEY (`FILE_ID`, `ACTION_TYPE`, `ACTION_ID`) )
<reponame>goldmansachs/obevo-kata CREATE FUNCTION func725() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE105);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE465);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE14...
SELECT * FROM ACTIVITIES ORDER BY INSERT_DATETIME %s;
<reponame>RalfEggert/ipc2015-apigility SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; DROP TABLE IF EXISTS `address`; CREATE TABLE IF NOT EXISTS `address` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `firstname` varchar(...
CREATE TABLE orders ( order_id integer PRIMARY KEY, product_no integer REFERENCES products, quantity integer );
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/free/Opengauss_Function_Keyword_Free_Case0034.sql<gh_stars>0 -- @testpoint: opengauss关键字free(非保留),作为游标名,合理报错 --前置条件 drop table if exists explain_test cascade; create table explain_test(cid int,fid int); --关键字不带引号-成功 start transaction; cursor free...
<reponame>devopsmanojn/laraclassified -- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64) -- -- Host: 127.0.0.1 Database: laraclassified -- ------------------------------------------------------ -- Server version 5.7.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARA...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Gép: 127.0.0.1 -- Létrehozás ideje: 2022. Feb 16. 19:47 -- Kiszolgáló verziója: 10.4.22-MariaDB -- PHP verzió: 8.1.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 23, 2021 at 01:39 AM -- Server version: 5.7.26 -- PHP Version: 7.2.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
<reponame>AlessandroZanatta/DatabaseProject<gh_stars>0 ------------------------------------------------------------------------------------- -- STARTUP / CLEANUP ------------------------------------------------------------------------------------- CREATE EXTENSION pg_cron; DROP SCHEMA IF EXISTS SistemaTrasportoUrbano C...
CREATE USER 'osmdb'@'localhost' IDENTIFIED BY 'aUgH(TsF"^X/_6p}KnVxe,d[TdzRbE$WYYNversions'; GRANT ALL ON osm_walking TO 'osmdb'@'localhost';
-- uninstall: drop table saas_asset_types cascade constraints purge; exec drop_table('saas_asset_types'); begin if not does_table_exist('saas_asset_types') then execute_sql(' create table saas_asset_types ( asset_type_id number generated by default on null as identity, asset_type_name varch...
# Write your MySQL query statement below SELECT (SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT 1, 1) AS SecondHighestSalary
DO 'DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema() AND tablename NOT LIKE $$%yoyo_%$$) LOOP EXECUTE $$DROP TABLE IF EXISTS $$ || quote_ident(r.tablename) || $$ CASCADE$$; END LOOP; FOR r in (SELECT n.nspname AS "schema", t.typname ...
<filename>categorias/sql/postgresql/2605.sql SELECT products.name, providers.name FROM products, providers WHERE products.id_categories = 6 and products.id_providers = providers.id;
ALTER TABLE environments DROP COLUMN IF EXISTS event_ids;
<gh_stars>0 /* * Copyright (c) 2018 LabKey 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.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
-- what type of items select i.display_as_code ,count(*) n ,count(*)*100/sum(count(*)) over (partition by null) pct from APEX_APPLICATION_PAGE_ITEMS i where i.application_id between 4000 and 5000 and i.display_as_code <> 'NATIVE_DISPLAY_ONLY' group by i.display_as_code order by 2 desc; ...
-- public.customer definition -- Drop table -- DROP TABLE public.customer; CREATE TABLE public.customer ( last_name text NOT NULL, description text NULL, street_name text NULL, house_number text NULL, postal_code text NULL, locality text NULL, country text NULL, email text NULL, url text NULL, first_name t...
BEGIN; CREATE TABLE IF NOT EXISTS USERS( id serial PRIMARY KEY, username varchar(20) NOT NULL, password text NOT NULL, ...
<gh_stars>1-10 CREATE CONSTRAINT ON (`config`:`config`) ASSERT `config`.`entityId` IS UNIQUE; CREATE CONSTRAINT ON (`flow_cookie`:`flow_cookie`) ASSERT `flow_cookie`.`entityId` IS UNIQUE; CREATE CONSTRAINT ON (`flow_cookie`:`flow_cookie`) ASSERT `flow_cookie`.`unmasked_cookie` IS UNIQUE; CREATE CONSTRAINT ON (`flow_dum...
<gh_stars>10-100 SELECT * FROM all_tables WHERE OWNER LIKE '%WILD%' ORDER BY OWNER ASC, TABLE_NAME ASC SELECT * FROM WHSE_WILDLIFE_MANAGEMENT.LEH_APPLICATIONS SELECT * FROM WHSE_WILDLIFE_INVENTORY.GCPB_CARIBOU_POPULATION_SP SELECT * FROM all_tables WHERE TABLE_NAME LIKE '%FTEN%' ORDER BY OWNER ASC, TABLE_NAME ASC...
SELECT student_id FROM payments GROUP BY student_id ORDER BY SUM(amount) DESC LIMIT 1 OFFSET 1
<filename>scripts/legacy-sql/migrate/changes-2007-08-23.sql ALTER TABLE gene_product_count ADD COLUMN species_id integer; ALTER TABLE species ADD COLUMN left_value integer; ALTER TABLE species ADD COLUMN right_value integer;
<filename>tools/perf/core/tbmv3/metrics/power_rails_metric.sql -- A metric that collects on-device power rails measurement for the -- duration of the story run. Power drain breakdown is device-specific -- since different devices have different sensors. -- See go/power-mobile-benchmark for the list of supported devices....
-- Lista średniej długości utworu w formacie MPEG audio file, który pojawił się na przynajmniej 2 playlistach w zależności od gatunku utworu. DECLARE tracklength NUMBER; genrename VARCHAR(200); BEGIN for v_rec in ( SELECT AVG(tr.milliseconds) as averagelength, genre.name FROM ( SELECT ...
DROP DATABASE IF EXISTS bamazon; CREATE database bamazon; USE bamazon; CREATE TABLE products ( item_id VARCHAR(100) NULL, product_name VARCHAR(100) NULL, department_name VARCHAR(100), price DECIMAL(10,2) NULL, stock_quantity INT(4) PRIMARY KEY (position) ); SELECT * FROM products;
Create table If Not Exists Employee (Id int, Salary int); Truncate table Employee; insert into Employee (Id, Salary) values ('1', '100'); insert into Employee (Id, Salary) values ('2', '200'); insert into Employee (Id, Salary) values ('3', '300'); insert into Employee (Id, Salary) values ('4', '300'); insert into Emplo...
SELECT * /*SUM(cantidadIngreso),SUM(cantidadFactura),SUM(cantidadEgreso) *//*as Saldo*/ FROM ( SELECT i.idIngdetalle,i.idIngreso,i1.fechamov, i.articulo,i1.almacen, i.cantidad cantidadIngreso , NULL cantidadFactura,NULL cantidadEgresoNE, NULL cantidadTraspaso FROM ingdetalle i INNER JOIN ingresos i1 ON i.idIngres...
/* Replace with your SQL commands */ INSERT INTO "user" (name, email, PASSWORD, status) VALUES ('Vincent', '<EMAIL>', <PASSWORD>', 'ACCEPTED'); INSERT INTO auth_group_user (user_uuid, group_uuid) SELECT u.uuid, g.uuid FROM "user" u JOIN auth_group g ON u.email = '<EMAIL>' AND g.name = 'syst...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 26, 2020 at 04:51 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE TABLE `tax_article_info` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tax_type` varchar(10) DEFAULT NULL, `title` varchar(100) DEFAULT NULL, `issuing_date` varchar(32) DEFAULT NULL, `issuing_no` varchar(100) DEFAULT NULL, `article_url` varchar(255) DEFAULT NULL, `main_body` longtext, `attachment` var...
<reponame>DuncanCasteleyn/EF-ASP.NET-music-project-3TI<gh_stars>0 DECLARE @CurrentMigration [nvarchar](max) IF object_id('[dbo].[__MigrationHistory]') IS NOT NULL SELECT @CurrentMigration = (SELECT TOP (1) [Project1].[MigrationId] AS [MigrationId] FROM ( SELECT [Extent1].[Migrati...
/* Author: This code was generated by DALGen version 1.1.0.0 available at https://github.com/H0r53/DALGen Date: 12/15/2017 Description: Creates the blogcategory table and respective stored procedures */ USE applicationtemplate; -- ------------------------------------------------------------ -- Drop existing o...
<reponame>rashad22/cip -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 20, 2016 at 08:08 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLI...
<reponame>tushartushar/dbSmellsData<filename>data/open-source/extracted_sql/MinecraftWars_Gringotts.sql select id from gringotts_account where owner=:owner and type=:type))"); select * from accountchest select id from account where owner=? and type=?))"); SELECT cents FROM account WHERE owner = ? and type = ? UPDATE ac...
SELECT UPPER(name) FROM mytable
-- @author: <EMAIL> -- @site: e-smartdata.org -- Funkcje tekstowe CREATE OR REPLACE TABLE functions.movies ( id STRING NOT NULL, movie_name STRING, rating FLOAT64, duration FLOAT64, is_polish BOOL, year_of_production INT64 ); INSERT INTO functions.movies VALUES ('001', 'Batman', 4.5, 92.0, false, 2002)...
<reponame>jdkoren/sqlite-parser -- zeroblob.test -- -- execsql {select zeroblob(-1)} select zeroblob(-1)
-- file:join.sql ln:1241 expect:true select * from text_tbl t1 left join int8_tbl i8 on i8.q2 = 123, lateral (select i8.q1, t2.f1 from text_tbl t2 limit 1) as ss1, lateral (select ss1.* from text_tbl t3 limit 1) as ss2 where t1.f1 = ss2.f1
/* * Here is a link with an sql that shows how to create product prices http://docs.metasfresh.org/sql_collection/m_productprice.html * * * Creates M_ProductPrice records with price 0, for the given M_PriceList_Version_ID and C_TaxCategory_ID * The default values are for plv Testpreise Kunden (Deutschland) Deutschlan...
-- 2017-09-12T13:11:12.834 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,I...