sql stringlengths 6 1.05M |
|---|
<filename>src/test/resources/sql/create_index/cdd3441a.sql
-- file:alter_table.sql ln:1809 expect:true
CREATE INDEX comment_test_index ON comment_test(indexed_col)
|
<gh_stars>1-10
INSERT INTO WWS_COUNTRIES (ID, NAME, ISO3, ISO2, PHONECODE, CAPITAL, CURRENCY, CREATED_AT, UPDATED_AT, FLAG, WIKIDATAID) VALUES (84, 'Gibraltar', 'GIB', 'GI', '350', 'Gibraltar', 'GIP', TO_TIMESTAMP('2018-07-20 16:41:03','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2018-07-20 16:41:03','YYYY-MM-DD HH24:MI:SS'... |
-- MySQL dump 10.16 Distrib 10.1.45-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: products
-- ------------------------------------------------------
-- Server version 10.1.45-MariaDB-0+deb9u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... |
<reponame>Wang-Yong2018/pgml
WITH base_0 AS (
SELECT
*
FROM
{{ ref('stg_train_fe_baseline') }}
),
dim_title AS (
SELECT
*
FROM
{{ ref('titles_refined') }}
)
select
base.*, dt.titles_refined_fe_1
FROM
base_0 as base inner join dim_title as dt
on base.passenge... |
-- 03.09.2015 15:08
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Ref_Table SET WhereClause='
EXISTS
(
SELECT 1 FROM C_Invoice i
INNER JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_Invoice_ID
INNER JOIN C_Invoice_Line_Alloc ila ON il.C_InvoiceLine_ID = ila.C_InvoiceLine_ID
... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 18-10-2020 a las 04:59:11
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>sql/documents/ea-foundation-docs.sql
insert into documents(url,title,publication_date,modified_date,author,publisher,affected_donors,affected_donees,document_scope,cause_area,notes) values
('https://forum.effectivealtruism.org/posts/mwbaM5SeMy8GJMQus/effective-altruism-foundation-update-plans-for-2018-and-r... |
DROP DATABASE IF EXISTS employee_tracker_db;
CREATE database employee_tracker_db;
USE employee_tracker_db;
CREATE TABLE employee (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(100) NULL,
last_name VARCHAR(100) NULL,
role_id integer,
manager_id integer,
PRIMARY KEY (id)
);
CREATE TABLE role (
id I... |
<filename>scripts/production/prd_menu.sql
INSERT INTO `accelog_categorias` (`idcategoria`, `nombre`, `icono`, `orden`) VALUES
(1072, 'Produccion', 0, 10005);
INSERT INTO `accelog_menu` (`idmenu`, `nombre`, `idmenupadre`, `url`, `idcategoria`, `icono`, `orden`, `omision`) VALUES
(2350, 'Procesos de Producción', 0, '... |
<filename>custom-migrations/auth/V7__FIX_CONNECTION_CONFIGURATION_FORREAL.sql
use auth;
update connection set requiredFields = '[{"label":"Account Name", "id":"name"}]' where id = "manual-token";
update user set general_metadata = '{"name":"Common Area Service User"}' where email = "CommonAreaUser"; |
<reponame>centreon-lab/centreon-broker<filename>bam/postgresql_v3/mod_bam_reporting_kpi_events.sql
--
-- KPI events.
--
CREATE TABLE mod_bam_reporting_kpi_events (
kpi_event_id serial,
kpi_id int NOT NULL,
start_time int NOT NULL,
end_time int default NULL,
status smallint default NULL,
in_downtime boolean... |
COMMENT ON COLUMN device_log_item.decoded_message IS 'The decoded message of this device log item.';
COMMENT ON COLUMN device_log_item.device_identification IS 'The identification of a device for this device log item.';
COMMENT ON COLUMN device_log_item.device_uid IS 'The unique ID of a device for this device log item.... |
<gh_stars>10-100
-- permissions are initialized empty
-- run yarn workspace @pdc/service-user ilos set-permissions
-- to set the values calculated from permissions.ts
INSERT INTO common.roles (slug, description, permissions) VALUES
('registry.admin', 'Administrateur du registre', '{}'),
('registry.user', 'Utilisateur d... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--Create table with compresstype =none, compresslevel=0
Drop table if exists neg_tb1 ;
Create table neg_tb1 (a1 int ENCODING (compresstype=none,compresslevel=0,blocksize=32768),a2 char(5),a3 text,a4 timestamp ,a5 date) with (appendonly... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-06-2016 a las 03:29:22
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
CREATE SCHEMA minion_test;
CREATE TABLE minion_test.Session (sessionID INTEGER PRIMARY KEY,
sessionUser TEXT, sessionHost TEXT, sessionDate TEXT, version TEXT,
runComment TEXT);
CREATE TABLE minion_test.Config (
configID INTEGER NOT NULL, moduleName TEXT, paramIndex INTEGER,
paramName TEXT, paramValue TEXT, c... |
-- @testpoint:openGauss保留关键字from作为 用户名,
--不带引号,合理报错
CREATE USER from PASSWORD '<PASSWORD>';
--加双引号,创建成功
drop user if exists "from";
CREATE USER "from" PASSWORD '<PASSWORD>';
--清理环境
drop user "from";
--加单引号,合理报错
CREATE USER 'from' PASSWORD '<PASSWORD>';
--加反引号,合理报错
CREATE USER `from` PASSWORD '<PASSW... |
/*
Navicat Premium Data Transfer
Source Server : 172.16.31.10
Source Server Type : MySQL
Source Server Version : 50554
Source Host : localhost:3308
Source Schema : windbell
Target Server Type : MySQL
Target Server Version : 50554
File Encoding : 65001
Date: 03/06/201... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 19, 2021 at 10:30 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
create table connection
(
id serial not null constraint connection_pkey primary key,
client_id varchar(70) not null,
api_key varchar(100) not null,
api_url varchar(255) not null,
mg_url varchar(255) not null,
mg_token varchar(100) not null,
commands jsonb,
created_at timestamp wit... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : sam. 27 jan. 2018 à 16:58
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- Julia conducted a 15 days of learning SQL contest. The start date of the contest was March 01, 2016 and the end date was March 15, 2016.
-- Write a query to print total number of unique hackers who made at least 1 submission each day (starting on the first day of the contest),
-- and find the hacker_id and name of... |
<filename>moneytransfer.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: May 12, 2021 at 04:25 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone... |
<filename>quiz.sql
/******************************************************************************
* @coronapl
* Relational Databases
* Quiz
******************************************************************************/
-- CREACION DE TABLAS
/*
Carrera (Codigo, Nombre)
Ejemplo:
Carrera ('CS', 'Computer Science... |
CREATE SCHEMA IF NOT EXISTS bloom;
CREATE TABLE bloom.data_sources
(
source character varying(50) NOT NULL,
updated timestamp without time zone,
checked timestamp without time zone,
status character varying(50),
CONSTRAINT data_sources_source_key UNIQUE (source)
);
|
CREATE TABLE WaitLatestBaseline
(
WaitSnapshotId bigint NOT NULL,
WaitTypeId smallint NOT NULL,
Waiting_tasks_count bigint,
Wait_time_ms bigint,
Signal_wait_time_ms bigint
CONSTRAINT PK_WaitLatestBaseline PRIMARY KEY CLUSTERED (WaitSnapshotId, WaitTypeId)
) |
DROP TABLE products;
|
<gh_stars>1000+
-- 2018-07-12T17:28:21.346
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET FieldLength=255,Updated=TO_TIMESTAMP('2018-07-12 17:28:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=417
;
-- 2018-07-12T17:28:43.097
-- I forgot to set the DICTIONARY_ID_CO... |
-----------------------------------------------------------------------------
-- OLE_DS_ACCESS_LOCATION_CODE_T
-----------------------------------------------------------------------------
DECLARE temp NUMBER;
BEGIN
SELECT COUNT(*) INTO temp FROM user_tables WHERE table_name = 'OLE_DS_ACCESS_LOCATION_CODE_T';
IF tem... |
<filename>World/ALive/RC3/world/2011-12-13-01.world_creature.sql
UPDATE `creature` SET `position_z` = '11.309187' WHERE `entry` = '29308'; |
/*
VerseBot for reddit
By <NAME>
update_timestamp_columns.sql
Copyright (c) 2015 <NAME> (MIT License)
*/
ALTER TABLE book_stats DISABLE TRIGGER update_book_stats_timestamp;
ALTER TABLE translation_stats DISABLE TRIGGER update_translation_stats_timestamp;
UPDATE book_stats SET last_used = NULL WHERE count = 0;... |
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for dg_role
-- ----------------------------
DROP TABLE IF EXISTS `dg_role`;
CREATE TABLE `dg_role` (
`id` int(11) NOT NULL COMMENT '角色id',
`role_name` varchar(50) DEFAULT NULL COMMENT '角色名称',
`valid` tinyint(1) DEFA... |
<gh_stars>10-100
{% macro mysql5__snapshot_merge_sql_update(target, source, insert_cols) -%}
update {{ target }}, (select dbt_scd_id, dbt_change_type, dbt_valid_to from {{ source }}) as DBT_INTERNAL_SOURCE
set {{ target }}.dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to
where DBT_INTERNAL_SOURCE.dbt_scd_id... |
<reponame>yacon/koala-framework
CREATE TABLE IF NOT EXISTS `kwc_basic_flashmediaplayer` (
`component_id` varchar(255) NOT NULL,
`kwf_upload_id_media` int(11) default NULL,
`width` smallint(6) NOT NULL,
`height` smallint(6) NOT NULL,
`autostart` tinyint(1) NOT NULL default '0',
`loop` tinyint(1) NOT NULL def... |
<reponame>opengauss-mirror/Yat
-- @testpoint:创建数据源对象,Data Source名称符合标识符的命名规范
--创建数据源对象,不含任何信息,名称以下划线开头
DROP DATA SOURCE if exists _ds_test1$;
CREATE DATA SOURCE _ds_test1$;
--查询创建的数据源对象信息
select srcname,srctype,srcversion,srcacl,srcoptions from PG_EXTENSION_DATA_SOURCE where srcname = '_ds_test1$';
--创建数据源对象,Data Sour... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 03-Abr-2021 às 10:42
-- Versão do servidor: 5.6.41
-- versão do PHP: 5.6.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>malone081021/programimg-resource
CREATE TABLE `test_e` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`e` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
SELECT * FROM `jzb-ka`.test_e;
INSERT INTO test_e (id, e) VALUES ( 1, "\xF0\x9F\x90\xB0\xF0\x9F" ... |
<gh_stars>0
CREATE TABLE matchmaking_player (
id VARCHAR(100) NOT NULL,
version VARCHAR(100) NOT NULL,
game_mode VARCHAR(100) NOT NULL,
region VARCHAR(100) NOT NULL,
status VARCHAR(100) NOT NULL,
game_server_id VARCHAR(100) NULL,
ticket VARCHAR(100) NULL,
matched_time TIMESTAMP NULL,
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 26-Set-2021 às 15:32
-- Versão do servidor: 5.7.31
-- versão do PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Mag 10, 2018 alle 20:01
-- Versione del server: 10.1.31-MariaDB
-- Versione PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
/*
Navicat Premium Data Transfer
Source Server : MySqlConn-local
Source Server Type : MySQL
Source Server Version : 100130
Source Host : localhost:3306
Source Schema : productionreport
Target Server Type : MySQL
Target Server Version : 100130
File Encoding : 65001
Da... |
<reponame>gsiems/tasker-schema
-- TODO
SET search_path = tasker, pg_catalog ;
CREATE OR REPLACE FUNCTION task_association__insert (
a_task_id integer,
a_associated_task_id integer,
a_association_type_id int2,
a_session_username varchar )
RETURNS dml_ret
SECURITY DEFINER
-- Set a secure search_path
SET... |
<filename>DDLs/parquet-table.sql
DROP TABLE IF EXISTS parquet_table;
CREATE EXTERNAL TABLE parquet_table(
userId string,
movieId string,
rating string,
ts string
)
STORED AS PARQUET
LOCATION 's3://dataset-collection-extracts/Processed-files/uncompressed/Parquet/';
|
DROP FUNCTION IF EXISTS get_user_id;
CREATE OR REPLACE FUNCTION get_user_id
(
)
RETURNS INT
AS
$body$
BEGIN
RETURN
(
SELECT CAST(current_setting('jeff_farm_ws.user_id') AS INT)
);
END
$body$
LANGUAGE plpgsql;
|
--UPDATE all account information except email, hashed password and salt.
CREATE OR REPLACE FUNCTION accounts_update(
id BIGINT,
provider VARCHAR(256) DEFAULT NULL,
verified BOOLEAN DEFAULT NULL,
first_name VARCHAR(256) DEFAULT NULL,
last_name VARCHAR(256) DEFAULT NULL,
mobile_phone VARCHAR(2... |
/*
db schema for pysmsd internal database, intended for use with sqlite3
TODO:
- do in_messages and out_messages need to be in seperate tables?
*/
DROP TABLE IF EXISTS `clients`;
CREATE TABLE `clients` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
-- basic text info --
`name` varchar(32... |
--This is a placeholder that is replaced by the build process |
<reponame>dhmehta24/texlocker
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2020 at 05:35 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
#standardSQL
SELECT
data.*
FROM(
SELECT
ARRAY(
SELECT AS STRUCT
STRUCT(1 as schema_version, STRUCT(STRUCT(NULL) AS location, "" AS gender) as user,
STRUCT(STRUCT("11" AS value, "bid" AS type) AS bid, STRUCT("_392" AS value, "customer_user_id" AS type) AS customer_user_id, STRUCT(fullvisitorid AS value, "djU... |
<gh_stars>1-10
CREATE USER 'repl'@'localhost' IDENTIFIED BY 'repl';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';
|
<reponame>Pachinchin/gbt-repo
create view "dev"."dbt_nobodozie"."stg_payments__dbt_tmp" as (
with payment as (
select
id as payment_id,
orderid as order_id,
paymentmethod as payment_method,
-- amount is stored in cents, convert it to dollars
amount/100 as amount,
... |
<gh_stars>100-1000
BEGIN TRANSACTION;
ALTER TABLE "sponsorTimes" ADD "service" TEXT NOT NULL default 'YouTube';
-- UPDATE "sponsorTimes" SET "service" = "YouTube";
DROP INDEX IF EXISTS "privateDB_sponsorTimes_videoID";
UPDATE "config" SET value = 3 WHERE key = 'version';
COMMIT; |
<filename>Sisteme de Gestiune a Bazelor de Date (SGBD)/Laborator/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/reports/Pkg_Osdm_Utils.sql
CREATE OR REPLACE PACKAGE PKG_OSDM_UTILS AS
PROCEDURE Generate_Report(v_rep_id IN NUMBER,
v_obj_ovid IN VARCHAR2,
... |
--
-- Copyright 2018, akashche at redhat.com
--
-- 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 ag... |
<filename>schemes/e_teams_simple/e_teams_simple_db.sql
CREATE DATABASE e_teams_simple_db;
|
<filename>roboger/resources/sql/endpoint.update.sql
UPDATE endpoint
SET {}=:v
WHERE id=:id
|
<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/view/view1.sql
CREATE VIEW view1 AS
SELECT 1 AS c1
FROM table207
UNION
SELECT 1 AS c1
FROM table206
UNION
SELECT 1 AS c1
FROM table175
UNION
SELECT 1 AS c1
FROM view2
UNION
SELECT 1 AS c1
FROM view76
UNION
SELECT 1 AS c1
FROM view66;... |
CREATE USER 'radiusd'@'localhost' IDENTIFIED BY '<PASSWORD>';
GRANT USAGE ON *.* TO 'radiusd'@'localhost' IDENTIFIED BY '<PASSWORD>';
GRANT INSERT,SELECT,UPDATE ON vpnxs_radius.* TO 'radiusd'@'localhost';
GRANT INSERT,SELECT,UPDATE,DELETE ON vpnxs_radius.session TO 'radiusd'@'localhost';
FLUSH PRIVILEGES; |
CREATE DATABASE IF NOT EXISTS `db_portal_noticias` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
USE `db_portal_noticias`;
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
--
-- Host: localhost Database: db_portal_noticias
-- ------------------------------------------------------
-- S... |
<filename>database/ckb_excel.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Waktu pembuatan: 07 Feb 2020 pada 07.29
-- Versi server: 10.4.10-MariaDB
-- Versi PHP: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zon... |
SELECT name
FROM teacher
WHERE dept IS NULL;
SELECT teacher.name, dept.name
FROM teacher INNER JOIN dept ON(teacher.dept=dept.id);
SELECT teacher.name, dept.name
FROM teacher LEFT JOIN dept ON(teacher.dept = dept.id);
SELECT teacher.name, dept.name
FROM teacher RIGHT JOIN dept ON(teacher.dept = dept.id);
SELECT nam... |
insert into USERS (CPF, gender, dateOfBirth, email, fullName, "password")
values ('35239782152', 'M', '2001-09-28', '<EMAIL>', '<NAME>', 'senha');
insert into cellphone (cellphoneNumber, fk_idUser)
values ('+55 61 3232-8065', 1), ('+55 61 9 9989-8065', 1);
insert into CREDIT_CARD (cardNumber, cardholderName, CVV, ex... |
-- MySQL dump 10.13 Distrib 5.7.28-31, for Linux (x86_64)
--
-- Host: localhost Database: alttprbot
-- ------------------------------------------------------
-- Server version 5.7.28-31
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 17, 2021 at 04:37 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
1. Which store of merchant 43 is having maximum sale? Write SQL query.
SELECT store_id,
SUM(pay_amount) AS total_sales
FROM orders
WHERE merchant_id = 43
GROUP BY store_id
ORDER BY total_sales DESC LIMIT 1;
2a. Provide payment methods and their count with having pay_amount Rs. 250.98 in orders table.
SELECT p... |
<reponame>sevdalin/Software-University-SoftUni<filename>CSharp-DB-Fundamentals/Databases Basics - MS SQL Server/08. Functions, Triggers and Transactions/Problem 2 - Employees with Salary Above Number.sql
CREATE PROC dbo.usp_GetEmployeesSalaryAboveNumber (@Ammount money)
AS
SELECT FirstName, LastName FROM Employees AS [... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 07 Apr 2021 pada 02.42
-- Versi server: 10.1.32-MariaDB
-- Versi PHP: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
/*
Navicat Premium Data Transfer
Source Server : LAPTOP-EJ4J5JAQ
Source Server Type : SQL Server
Source Server Version : 10504000
Source Catalog : bookshop
Source Schema : dbo
Target Server Type : SQL Server
Target Server Version : 10504000
File Encoding : 6500... |
<reponame>ucdavis/StudentService<gh_stars>1-10
CREATE TABLE [dbo].[Terms]
(
[Id] INT NOT NULL PRIMARY KEY,
[Name] varchar(50) NOT NULL,
[Start] DATE NOT NULL,
[End] DATE NOT NULL,
[TypeCode] CHAR NULL
)
|
DROP TABLE climon_stats;
ALTER TABLE climon RENAME TO climon_old;
CREATE TABLE climon (time timestamp, sensor,
metric, value,
CONSTRAINT pk PRIMARY KEY (time, sensor, metric)) WITHOUT ROWID;
INSERT INTO climon (time, sensor, metric, value)
SELECT time, sensor, 0, temperature FROM climon_old;
INS... |
<filename>Chapter07/7_9.sql
------------------------ pg_stat_statements -----------------------
pgbench=# SELECT round(total_time*1000)/1000 AS total_time,query FROM pg_stat_statements ORDER BY total_time DESC;
|
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: vps.thunders.spb.ru
-- Generation Time: Aug 12, 2014 at 06:16 PM
-- Server version: 5.1.66-0+squeeze1-log
-- PHP Version: 5.3.27-pl0-gentoo
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... |
-- file:numeric.sql ln:442 expect:true
INSERT INTO num_exp_ln VALUES (4,'15.86956523951936572464')
|
<filename>TRAN Octavia/omk.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mer. 22 avr. 2020 à 23:49
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
CREATE TABLE manufacturerlang (
id CHAVE NOT NULL,
id_manufacturer CHAVE NOT NULL,
id_lang CHAVE NOT NULL,
description TEXT,
short_description TEXT,
meta_title CHARACTER VARYING(128),
meta_keywords CHARACTER VARYING(255),
meta_description CHARACTER VARYING(25... |
<gh_stars>0
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.1.40-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COL... |
-- multuple not in clauses, distinct aggregate
-- added simple filter in subquery
select * from j2 where c_bigint not in ( select cast(c_integer as bigint) from j6 where c_boolean is true ) and c_date not in ( select distinct c_date from j6);
|
<reponame>BrettPWRE/HDB<gh_stars>0
alter table ref_res_flowlu
add
constraint ref_res_flowlu_fk1
foreign key (site_id)
references hdb_site(site_id)
;
|
/*
Warnings:
- You are about to drop the column `bet_id` on the `category` table. All the data in the column will be lost.
- A unique constraint covering the columns `[bet_id]` on the table `bet` will be added. If there are existing duplicate values, this will fail.
- Added the required column `bet_id` to the ... |
/*
-- Query: SELECT * FROM careconnect.Address where ADDRESS_ID > 7
LIMIT 0, 1000
-- Date: 2017-10-03 13:50
*/
INSERT INTO Address (ADDRESS_ID,RES_DELETED,RES_CREATED,RES_MESSAGE_REF,RES_UPDATED,address_1,address_2,address_3,address_4,address_5,city,county,postcode) VALUES (4001,NULL,NULL,'',NULL,'2 Braunstone Court',... |
-- Deploy delivery:add_approved_at_to_change to pg
-- requires: changes
BEGIN;
ALTER TABLE changes ADD COLUMN approved_at cd_timestamp DEFAULT NULL;
COMMIT;
|
SET search_path = tdm, pg_catalog ;
CREATE TABLE tdm.dt_user_password (
user_id integer NOT NULL,
password_hash text,
created_by integer,
created_dt timestamp with time zone DEFAULT ( now () AT TIME ZONE 'UTC' ),
updated_by integer,
updated_dt timestamp with time zone,
CONSTRAINT dt_user_pa... |
SELECT * FROM Planes
WHERE [Name] LIKE '%tr%'
ORDER BY Id, [Name], Seats, [Range] |
<gh_stars>0
CREATE FUNCTION [dbo].[GetBestCounterPartsCount]
(
@KeyWord NVARCHAR(300),
@CurrentNegotiationID UniqueIdentifier
)
RETURNS INT
AS
BEGIN
RETURN ISNULL((SELECT SUM(CounterPartsCount) / COUNT(*) AS [CounterPart Average]
FROM dbo.HighValuesNegs
WHERE (PreferenceSetName L... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-10-2020 a las 23:43:24
-- Versión del servidor: 10.4.10-MariaDB
-- Versión de PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
<gh_stars>0
# CRUD : READ
# SELECT FROM
use world;
select *
from country;
select code, name, population
from country;
select code as country_code, name as country_name, population
from country;
/*show databases;
show tables;*/
-- desc country;
select code
# ,name
from country;
select code, name, gnp, gnp * 1000 ... |
<filename>web/dbWebSource/tables/sql_commands.sql
CREATE TABLE sql_commands(
sqlcmd_id INT IDENTITY(1,1) NOT NULL
,sqlcmd_code VARCHAR(50) NULL
,sqlcmd_text NTEXT(2147483646) NOT NULL
,is_procedure CHAR(1) NOT NULL
,is_public CHAR(1) NOT NULL
,created_by INT NULL
,created_date DATETIME NULL
,updated_by INT NULL
,update... |
<reponame>eulogix/cool-gendoc-bundle
SET lc_messages TO 'en_US.UTF-8';
DROP VIEW IF EXISTS document_job_calc_h1 CASCADE;
CREATE VIEW document_job_calc_h1 AS
SELECT
a.document_job_id,
b.status,
COUNT(b.document_job_id) AS documents_nr,
COALESCE(MAX(b.update_date), MAX(b.creation... |
<filename>db/accdb/schema/DataModels/UPDATE/UpdateParamAllocationAccountData.sql<gh_stars>0
UPDATE Allocations
INNER JOIN StatusOfFunds
ON (Allocations.RcCode = StatusOfFunds.RcCode)
AND (Allocations.AccountCode = StatusOfFunds.AccountCode)
AND (Allocations.BocCode = StatusOfFunds.BocCode)
AND (Allocations.OrgCode... |
<gh_stars>1-10
SELECT
j.*
FROM all_jobs j
WHERE 1=1
ORDER BY j.job |
<filename>CMC030/ba/open/ba_form.ddl<gh_stars>1-10
DEFINE RECORD CDD$TOP.BA.BA_FORM
DESCRIPTION IS /*Billing to Agency Form Library*/.
BA_FORM_CDD STRUCTURE.
END BA_FORM_CDD STRUCTURE.
END BA_FORM.
|
-- Create a new database called 'blog'
-- Connect to the 'master' database to run this snippet
USE master
GO
-- Create the new database if it does not exist already
IF NOT EXISTS (
SELECT name
FROM sys.databases
WHERE name = N'blog'
)
CREATE DATABASE blog
GO |
SELECT
reviews.file
FROM
lecturers
JOIN reviews ON reviews.id = %d AND reviews.sread = 0
JOIN activities ON activities.id = reviews.activity AND activities.stashed = 0
JOIN requirements ON requirements.id = activities.requirement AND requirements.course = lecturers.course AND requirements.deleted = 0
... |
CREATE TABLE Minions(
Id INT PRIMARY KEY IDENTITY,
[Name] NVARCHAR(50) NOT NULL,
Age INT
)
CREATE TABLE Towns(
Id INT PRIMARY KEY IDENTITY,
[Name] NVARCHAR(50) NOT NULL
) |
<reponame>artificialideas/SteppinS<filename>SQL/steppinS-Data.sql
insert into Author (AUTHOR_NAME, AUTHOR_EMAIL, AUTHOR_PASSWORD) VALUES ('Anna','<EMAIL>','<PASSWORD>');
insert into Author (AUTHOR_NAME, AUTHOR_EMAIL, AUTHOR_PASSWORD) VALUES ('Steve','<EMAIL>','admin');
insert into Author (AUTHOR_NAME, AUTHOR_EMAIL, A... |
create or replace function pgq_node.version()
returns text as $$
-- ----------------------------------------------------------------------
-- Function: pgq_node.version(0)
--
-- Returns version string for pgq_node. ATM it is based on SkyTools
-- version and only bumped when database code changes.
-- -------... |
---
--- TodoList.TodoStatus
---
CREATE TABLE TodoStatus (
TodoStatusId INTEGER PRIMARY KEY AUTOINCREMENT
, ChoiceName TEXT
, OrderNo REAL
, IsDisabled INTEGER
);
---
--- Choices
INSERT INTO TodoStatus (ChoiceName, OrderNo) VALUES ('New', (SELECT IFNULL(MAX(OrderNo),0)+1 FROM TodoStatus));
INSERT INTO TodoStatus (Ch... |
--
-- Legal Notice
--
-- This document and associated source code (the "Work") is a part of a
-- benchmark specification maintained by the TPC.
--
-- The TPC reserves all right, title, and interest to the Work as provided
-- under U.S. and international laws, including without limitation all patent
-- and trade... |
-- This file generated by generate.py.
-- <yaml>
-- DependsOn: {}
-- </yaml>
SELECT CAST(vs."_id" AS VARCHAR) AS "_id",
vs."attributes" AS "attributes",
vs."clone_id" AS "clone_id",
vs."completion_time" AS "completion_time",
vs."events" AS ... |
create table if not exists scoring
(
id serial not null
constraint scoring_pk primary key,
current_scoring decimal not null
);
alter table scoring
owner to backend;
create table if not exists scoring_category
(
id serial not null
constraint scoring_category_pk primary key,
name varchar(255) not nul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.